using Ds.Module.DynamicApi ;
using Ds.Module.ResultFilter ;
using GZY.Quartz.MUI.Extensions ;
var builder = WebApplication . CreateBuilder ( args ) ;
// Add services to the container.
// <20> <> <EFBFBD> <EFBFBD> SignalR<6C> <52> <EFBFBD> <EFBFBD>
builder . Services . AddSignalR ( ) ;
builder . Services . AddControllers ( ) . AddDynamicWebApi ( ) ;
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder . Services . AddEndpointsApiExplorer ( ) ;
builder . Services . AddSwaggerGen ( ) ;
builder . Services . AddQuartzUI ( ) ;
//<2F> <> <EFBFBD> <EFBFBD> ClassJob<6F> <62> ע<EFBFBD> <D7A2> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
//services.AddQuartzClassJobs();
//<2F> <> <EFBFBD> ݿ<EFBFBD> ע<EFBFBD> 뷽ʽ i
//var optionsBuilder = new DbContextOptionsBuilder();
//optionsBuilder.UseMysql("server=xxxxxxx;database=xxx;User Id=xxxx;PWD=xxxx", b => b.MaxBatchSize(1));//<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ݿ<EFBFBD> <DDBF> <EFBFBD> <EFBFBD> <EFBFBD>
//services.AddQuartzUI(optionsBuilder.Options); //ע<> <D7A2> UI<55> <49> <EFBFBD> <EFBFBD>
var app = builder . Build ( ) ;
// Configure the HTTP request pipeline.
if ( app . Environment . IsDevelopment ( ) )
{
app . UseSwagger ( ) ;
app . UseSwaggerUI ( ) ;
}
//<2F> <> <EFBFBD> <EFBFBD> SignalR<6C> ˵<EFBFBD>
//endpoints.MapHub<ServerMonitorHub>("/serverMonitorHub");
//<2F> 쳣<EFBFBD> <ECB3A3> <EFBFBD> <EFBFBD> <EFBFBD> м<EFBFBD> <D0BC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
app . UseMiddleware < ExceptionHandlerMiddleware > ( ) ;
app . UseHttpsRedirection ( ) ;
app . UseAuthorization ( ) ;
app . MapControllers ( ) ;
app . UseQuartz ( ) ;
//<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
//https://localhost:7150/quartzui
app . Run ( ) ;