public void Register(IConfigurationConventionContext context) { context.AddInMemoryCollection(new Dictionary <string, string>() { ["abcd"] = "1234" }); }
/// <inheritdoc /> public void Register([NotNull] IConfigurationConventionContext context) { if (context == null) { throw new ArgumentNullException(nameof(context)); } var applicationLogLevel = context.Configuration.GetValue <LogLevel?>("ApplicationState:LogLevel"); if (applicationLogLevel.HasValue) { context.AddInMemoryCollection( new Dictionary <string, string> { { "Serilog:MinimumLevel:Default", LevelConvert.ToSerilogLevel(applicationLogLevel.Value).ToString() } } ); } }
//#endif //#if (!SkipConfiguration) public void Register(IConfigurationConventionContext context) { }