public PinglesBackgroundService(PinglesClientConfiguration config)
 {
     _config = config;
     _client = new HttpClient {
         BaseAddress = new Uri(config.PinglesServerUrl)
     };
 }
Beispiel #2
0
 public static IServiceCollection AddPingles(this IServiceCollection services, PinglesClientConfiguration clientConfiguration)
 {
     services.AddSingleton <PinglesClientConfiguration>(clientConfiguration);
     services.AddSingleton <IHostedService, PinglesBackgroundService>();
     return(services);
 }