コード例 #1
0
        public static void AddStateHydrator(this IServiceCollection serviceCollection, Action <StateHydratorOptions> optionsCallback)
        {
            var options = new StateHydratorOptions();

            optionsCallback(options);
            serviceCollection.AddSingleton(options);
            serviceCollection.AddScoped <StateHydrator>();
        }
コード例 #2
0
 public StateHydrator(IServiceProvider serviceProvider, StateHydratorOptions options)
 {
     this.serviceProvider = serviceProvider;
     this.options         = options;
 }