38 lines
1.0 KiB
C#
38 lines
1.0 KiB
C#
using EgwMultiEngineManager;
|
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
|
|
// Add services to the container.
|
|
|
|
builder.Services.AddControllers();
|
|
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
|
|
builder.Services.AddEndpointsApiExplorer();
|
|
builder.Services.AddSwaggerGen();
|
|
|
|
// aggiungo rif libreria EgwManager
|
|
#if false
|
|
string sCamExePath = @"c:\EgtProg\EgtEngine\EgtEngineR32.exe";
|
|
string sMainLuaPath = @"c:\Temp\EgwMultiEngineManager\Pipe.lua";
|
|
ExecProcessManager myExecProcessManager = new ExecProcessManager(sCamExePath, $"\"{sMainLuaPath}\"");
|
|
myExecProcessManager.SetMaxCamInstances(1);
|
|
myExecProcessManager.StartExecutionThread();
|
|
builder.Services.AddSingleton<ExecProcessManager>(myExecProcessManager);
|
|
#endif
|
|
|
|
var app = builder.Build();
|
|
|
|
// Configure the HTTP request pipeline.
|
|
if (app.Environment.IsDevelopment() || app.Environment.IsStaging())
|
|
{
|
|
app.UseSwagger();
|
|
app.UseSwaggerUI();
|
|
}
|
|
|
|
app.UseHttpsRedirection();
|
|
|
|
app.UseAuthorization();
|
|
|
|
app.MapControllers();
|
|
|
|
app.Run();
|