2024-04-28 22:10:54 +03:30
|
|
|
|
using Microsoft.AspNetCore.Builder;
|
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
|
using Netina.Core.QuartzServices;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Netina.Core;
|
|
|
|
|
|
public static class CoreConfig
|
2023-12-16 20:25:12 +03:30
|
|
|
|
{
|
|
|
|
|
|
|
2024-04-28 22:10:54 +03:30
|
|
|
|
public static async Task CoreInit(this IApplicationBuilder app)
|
|
|
|
|
|
{
|
2024-07-01 21:08:32 +03:30
|
|
|
|
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("NjA1NkAzMjM2MkUzMTJFMzliSzVTQlJKN0NLVzNVOFVKSlErcVEzYW9PSkZ2dUhicHliVjkrMncxdHpRPQ==");
|
2024-04-28 22:10:54 +03:30
|
|
|
|
var scopeFactory = app.ApplicationServices.GetRequiredService<IServiceScopeFactory>();
|
|
|
|
|
|
using (var scope = scopeFactory.CreateScope())
|
|
|
|
|
|
{
|
|
|
|
|
|
var jobScheduler = scope.ServiceProvider.GetService<JobScheduler>();
|
|
|
|
|
|
jobScheduler.Start();
|
|
|
|
|
|
}
|
2023-12-16 20:25:12 +03:30
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-04-28 22:10:54 +03:30
|
|
|
|
|