Beispiel #1
0
 public RegisterHostedService(IServiceCenter client, ServiceRegistration registration)
 {
     this.client       = client;
     this.registration = registration;
 }
Beispiel #2
0
        public static void AddServiceRegistry(this IServiceCollection services, ServiceRegistration registration, IServiceCenter client)
        {
            var reg = ServiceRegisterProvider.GetServices(registration);

            services.AddSingleton <IServiceCenter>(sp => client);
            services.AddSingleton <ServiceRegistration>(sp => registration);
            services.AddHostedService <RegisterHostedService>();
        }