コード例 #1
0
 public MaintenanceMiddleware(RequestDelegate next, MaintenancePage maintenancePage,
                              ILogger <MaintenanceMiddleware> logger)
 {
     _next            = next;
     _logger          = logger;
     _maintenancePage = maintenancePage;
 }
 public static IServiceCollection AddMaintenance(this IServiceCollection services,
                                                 MaintenancePage maintenancePage)
 {
     services.AddSingleton(maintenancePage);
     return(services);
 }