You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
abp/modules/client-simulation/demo/Volo.ClientSimulation.Demo/ClientSimulationDemoModule.cs

49 lines
1.4 KiB

using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic;
using Volo.Abp.Autofac;
using Volo.Abp.Modularity;
using Volo.ClientSimulation.Demo.Scenarios;
using Volo.ClientSimulation.Scenarios;
namespace Volo.ClientSimulation.Demo
{
[DependsOn(
typeof(AbpAspNetCoreMvcUiBasicThemeModule),
typeof(AbpAutofacModule),
typeof(ClientSimulationWebModule)
)]
public class ClientSimulationDemoModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<ClientSimulationOptions>(options =>
{
options.Scenarios.Add(
new ScenarioConfiguration(
typeof(DemoScenario),
clientCount: 20
)
);
});
}
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
var app = context.GetApplicationBuilder();
var env = context.GetEnvironment();
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseVirtualFiles();
app.UseRouting();
app.UseConfiguredEndpoints();
}
}
}