public static IMvcBuilder AddSnoozleReadOnlyJson(IMvcBuilder @this, IConfigurationSection configurationSection) { IReadOnlyJsonRuntimeConfigurationProvider runtimeConfigurationProvider = BuildRuntimeConfigurationProvider(); @this.Services.AddSingleton(runtimeConfigurationProvider); @this.AddSnoozleReadOnlyJsonCore(); return(@this.AddSnoozleCore(runtimeConfigurationProvider, configurationSection)); }
public static IMvcBuilder AddSnoozleReadOnlyJson(IMvcBuilder @this, Action <SnoozleReadOnlyJsonOptions> options) { IReadOnlyJsonRuntimeConfigurationProvider runtimeConfigurationProvider = BuildRuntimeConfigurationProvider(); @this.Services.AddSingleton(runtimeConfigurationProvider); @this.AddSnoozleReadOnlyJsonCore(); return(@this.AddSnoozleCore(runtimeConfigurationProvider, options)); }
public static IMvcBuilder AddSnoozleReadOnlyJson(this IMvcBuilder @this) { IServiceCollection serviceCollection = @this.Services; IReadOnlyJsonRuntimeConfigurationProvider runtimeConfigurationProvider = BuildRuntimeConfigurationProvider(); serviceCollection.AddScoped <IDataProvider, ReadOnlyJsonDataProvider>(); serviceCollection.AddSingleton(runtimeConfigurationProvider); @this.AddSnoozleCore(runtimeConfigurationProvider); return(@this); }
public ReadOnlyJsonDataProvider(IReadOnlyJsonRuntimeConfigurationProvider readOnlyJsonRuntimeConfigurationProvider) { _readOnlyJsonRuntimeConfigurationProvider = readOnlyJsonRuntimeConfigurationProvider; }
public ReadOnlyJsonDataProvider(IReadOnlyJsonRuntimeConfigurationProvider customRuntimeConfigurationProvider) { _customRuntimeConfigurationProvider = customRuntimeConfigurationProvider; }