Ejemplo n.º 1
0
 public static IServices AddPolling <T>(this IServices services, PollingConfig config)
     where T : class, IUpdateHandler => services
 .AddSingleton(config)
 .AddSingleton <IUpdateHandler, T>()
 .AddHostedService <PollingService>();