public static IServiceCollection UseSimpleData(this IServiceCollection services,
     Action<SimpleDataOptions> optionFunc)
 {
     return services.AddSingleton<ISimpleData>(_ =>
     {
         var options = new SimpleDataOptions();
         optionFunc(options);
         return new SimpleData(options);
     });
 }
Esempio n. 2
0
 public SimpleData(SimpleDataOptions options)
 {
     _options = options;
 }