コード例 #1
0
 /// <summary>
 /// Adds the provided extender config to the configuration
 /// </summary>
 /// <param name="extender">The extender config to add</param>
 /// <returns>This LoggingConfigBuilder</returns>
 public LoggingConfigBuilder AddExtender(ExtenderConfig extender)
 {
     Extenders.Add(extender);
     return this;
 }
コード例 #2
0
ファイル: ExtenderBase.cs プロジェクト: ivanpointer/NuLog
 /// <summary>
 /// Initializes the extender with the given configuration objects
 /// </summary>
 /// <param name="extenderConfig">The configuration for this extender</param>
 /// <param name="loggingConfig">The whole configuration</param>
 public virtual void Initialize(ExtenderConfig extenderConfig, LoggingConfig loggingConfig)
 {
     ExtenderConfig = extenderConfig;
     LoggingConfig = loggingConfig;
 }
コード例 #3
0
        /// <summary>
        /// Initializes this extender with the provided configuration
        /// </summary>
        /// <param name="extenderConfig">The configuration for this specific extender</param>
        /// <param name="loggingConfig">The whole configuration for the framework</param>
        public override void Initialize(ExtenderConfig extenderConfig, LoggingConfig loggingConfig)
        {
            // Let the base configure itself out
            base.Initialize(extenderConfig, loggingConfig);

            // Configure this extender, using the TraceListenerConfig
            if (extenderConfig != null)
            {
                TraceListenerConfig = extenderConfig is TraceListenerConfig
                    ? (TraceListenerConfig)extenderConfig
                    : new TraceListenerConfig(extenderConfig.Config);
            }
        }