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