Пример #1
0
        static void AddRequiredInfrastructure(this IServiceCollection services, EndpointConfiguration configuration)
        {
            var holder = new SessionAndConfigurationHolder(configuration);

            services.AddSingleton(provider => holder.Session);
            services.AddSingleton(holder);
            services.AddHostedService <EndpointManagement>();
        }
 public EndpointManagement(SessionAndConfigurationHolder holder)
 {
     this.holder = holder;
 }