using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.DependencyInjection; using Netina.Core.QuartzServices; namespace Netina.Core; public static class CoreConfig { public static async Task CoreInit(this IApplicationBuilder app) { Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("NjA1NkAzMjM2MkUzMTJFMzliSzVTQlJKN0NLVzNVOFVKSlErcVEzYW9PSkZ2dUhicHliVjkrMncxdHpRPQ=="); var scopeFactory = app.ApplicationServices.GetRequiredService(); using (var scope = scopeFactory.CreateScope()) { var jobScheduler = scope.ServiceProvider.GetService(); jobScheduler.Start(); } } }