Пример #1
0
 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()
                    }
                }
                    );
            }
        }
Пример #3
0
 //#endif
 //#if (!SkipConfiguration)
 public void Register(IConfigurationConventionContext context)
 {
 }