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