http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/82c3e389/src/Core/TimeEvaluator.cs ---------------------------------------------------------------------- diff --git a/src/Core/TimeEvaluator.cs b/src/Core/TimeEvaluator.cs index 4e8593a..8020680 100644 --- a/src/Core/TimeEvaluator.cs +++ b/src/Core/TimeEvaluator.cs @@ -21,128 +21,128 @@ using System; namespace log4net.Core { - /// <summary> - /// An evaluator that triggers after specified number of seconds. - /// </summary> - /// <remarks> - /// <para> - /// This evaluator will trigger if the specified time period - /// <see cref="Interval"/> has passed since last check. - /// </para> - /// </remarks> - /// <author>Robert Sevcik</author> - public class TimeEvaluator : ITriggeringEventEvaluator - { - /// <summary> - /// The time threshold for triggering in seconds. Zero means it won't trigger at all. - /// </summary> - private int m_interval; + /// <summary> + /// An evaluator that triggers after specified number of seconds. + /// </summary> + /// <remarks> + /// <para> + /// This evaluator will trigger if the specified time period + /// <see cref="Interval"/> has passed since last check. + /// </para> + /// </remarks> + /// <author>Robert Sevcik</author> + public class TimeEvaluator : ITriggeringEventEvaluator + { + /// <summary> + /// The time threshold for triggering in seconds. Zero means it won't trigger at all. + /// </summary> + private int m_interval; - /// <summary> - /// The UTC time of last check. This gets updated when the object is created and when the evaluator triggers. - /// </summary> - private DateTime m_lastTimeUtc; + /// <summary> + /// The UTC time of last check. This gets updated when the object is created and when the evaluator triggers. + /// </summary> + private DateTime m_lastTimeUtc; - /// <summary> - /// The default time threshold for triggering in seconds. Zero means it won't trigger at all. - /// </summary> - const int DEFAULT_INTERVAL = 0; + /// <summary> + /// The default time threshold for triggering in seconds. Zero means it won't trigger at all. + /// </summary> + const int DEFAULT_INTERVAL = 0; - /// <summary> - /// Create a new evaluator using the <see cref="DEFAULT_INTERVAL"/> time threshold in seconds. - /// </summary> - /// <remarks> - /// <para> - /// Create a new evaluator using the <see cref="DEFAULT_INTERVAL"/> time threshold in seconds. - /// </para> - /// <para> - /// This evaluator will trigger if the specified time period - /// <see cref="Interval"/> has passed since last check. - /// </para> - /// </remarks> - public TimeEvaluator() - : this(DEFAULT_INTERVAL) - { - } + /// <summary> + /// Create a new evaluator using the <see cref="DEFAULT_INTERVAL"/> time threshold in seconds. + /// </summary> + /// <remarks> + /// <para> + /// Create a new evaluator using the <see cref="DEFAULT_INTERVAL"/> time threshold in seconds. + /// </para> + /// <para> + /// This evaluator will trigger if the specified time period + /// <see cref="Interval"/> has passed since last check. + /// </para> + /// </remarks> + public TimeEvaluator() + : this(DEFAULT_INTERVAL) + { + } - /// <summary> - /// Create a new evaluator using the specified time threshold in seconds. - /// </summary> - /// <param name="interval"> - /// The time threshold in seconds to trigger after. - /// Zero means it won't trigger at all. - /// </param> - /// <remarks> - /// <para> - /// Create a new evaluator using the specified time threshold in seconds. - /// </para> - /// <para> - /// This evaluator will trigger if the specified time period - /// <see cref="Interval"/> has passed since last check. - /// </para> - /// </remarks> - public TimeEvaluator(int interval) - { - m_interval = interval; - m_lastTimeUtc = DateTime.UtcNow; - } + /// <summary> + /// Create a new evaluator using the specified time threshold in seconds. + /// </summary> + /// <param name="interval"> + /// The time threshold in seconds to trigger after. + /// Zero means it won't trigger at all. + /// </param> + /// <remarks> + /// <para> + /// Create a new evaluator using the specified time threshold in seconds. + /// </para> + /// <para> + /// This evaluator will trigger if the specified time period + /// <see cref="Interval"/> has passed since last check. + /// </para> + /// </remarks> + public TimeEvaluator(int interval) + { + m_interval = interval; + m_lastTimeUtc = DateTime.UtcNow; + } - /// <summary> - /// The time threshold in seconds to trigger after - /// </summary> - /// <value> - /// The time threshold in seconds to trigger after. - /// Zero means it won't trigger at all. - /// </value> - /// <remarks> - /// <para> - /// This evaluator will trigger if the specified time period - /// <see cref="Interval"/> has passed since last check. - /// </para> - /// </remarks> - public int Interval - { - get { return m_interval; } - set { m_interval = value; } - } + /// <summary> + /// The time threshold in seconds to trigger after + /// </summary> + /// <value> + /// The time threshold in seconds to trigger after. + /// Zero means it won't trigger at all. + /// </value> + /// <remarks> + /// <para> + /// This evaluator will trigger if the specified time period + /// <see cref="Interval"/> has passed since last check. + /// </para> + /// </remarks> + public int Interval + { + get { return m_interval; } + set { m_interval = value; } + } - /// <summary> - /// Is this <paramref name="loggingEvent"/> the triggering event? - /// </summary> - /// <param name="loggingEvent">The event to check</param> - /// <returns>This method returns <c>true</c>, if the specified time period - /// <see cref="Interval"/> has passed since last check.. - /// Otherwise it returns <c>false</c></returns> - /// <remarks> - /// <para> - /// This evaluator will trigger if the specified time period - /// <see cref="Interval"/> has passed since last check. - /// </para> - /// </remarks> - public bool IsTriggeringEvent(LoggingEvent loggingEvent) - { - if (loggingEvent == null) - { - throw new ArgumentNullException("loggingEvent"); - } + /// <summary> + /// Is this <paramref name="loggingEvent"/> the triggering event? + /// </summary> + /// <param name="loggingEvent">The event to check</param> + /// <returns>This method returns <c>true</c>, if the specified time period + /// <see cref="Interval"/> has passed since last check.. + /// Otherwise it returns <c>false</c></returns> + /// <remarks> + /// <para> + /// This evaluator will trigger if the specified time period + /// <see cref="Interval"/> has passed since last check. + /// </para> + /// </remarks> + public bool IsTriggeringEvent(LoggingEvent loggingEvent) + { + if (loggingEvent == null) + { + throw new ArgumentNullException("loggingEvent"); + } - // disable the evaluator if threshold is zero - if (m_interval == 0) return false; + // disable the evaluator if threshold is zero + if (m_interval == 0) return false; - lock (this) // avoid triggering multiple times - { - TimeSpan passed = DateTime.UtcNow.Subtract(m_lastTimeUtc); + lock (this) // avoid triggering multiple times + { + TimeSpan passed = DateTime.UtcNow.Subtract(m_lastTimeUtc); - if (passed.TotalSeconds > m_interval) - { - m_lastTimeUtc = DateTime.UtcNow; - return true; - } - else - { - return false; - } - } - } - } + if (passed.TotalSeconds > m_interval) + { + m_lastTimeUtc = DateTime.UtcNow; + return true; + } + else + { + return false; + } + } + } + } }
http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/82c3e389/src/DateFormatter/AbsoluteTimeDateFormatter.cs ---------------------------------------------------------------------- diff --git a/src/DateFormatter/AbsoluteTimeDateFormatter.cs b/src/DateFormatter/AbsoluteTimeDateFormatter.cs index b035f73..9d6cf6a 100644 --- a/src/DateFormatter/AbsoluteTimeDateFormatter.cs +++ b/src/DateFormatter/AbsoluteTimeDateFormatter.cs @@ -101,36 +101,36 @@ namespace log4net.DateFormatter /// </remarks> virtual public void FormatDate(DateTime dateToFormat, TextWriter writer) { - lock (s_lastTimeStrings) - { + lock (s_lastTimeStrings) + { // Calculate the current time precise only to the second long currentTimeToTheSecond = (dateToFormat.Ticks - (dateToFormat.Ticks % TimeSpan.TicksPerSecond)); - string timeString = null; + string timeString = null; // Compare this time with the stored last time // If we are in the same second then append // the previously calculated time string - if (s_lastTimeToTheSecond != currentTimeToTheSecond) - { - s_lastTimeStrings.Clear(); - } - else - { - timeString = (string) s_lastTimeStrings[GetType()]; - } - - if (timeString == null) - { + if (s_lastTimeToTheSecond != currentTimeToTheSecond) + { + s_lastTimeStrings.Clear(); + } + else + { + timeString = (string) s_lastTimeStrings[GetType()]; + } + + if (timeString == null) + { // lock so that only one thread can use the buffer and // update the s_lastTimeToTheSecond and s_lastTimeStrings // PERF: Try removing this lock and using a new StringBuilder each time lock(s_lastTimeBuf) { - timeString = (string) s_lastTimeStrings[GetType()]; + timeString = (string) s_lastTimeStrings[GetType()]; - if (timeString == null) - { + if (timeString == null) + { // We are in a new second. s_lastTimeBuf.Length = 0; @@ -138,7 +138,7 @@ namespace log4net.DateFormatter FormatDateWithoutMillis(dateToFormat, s_lastTimeBuf); // Render the string buffer to a string - timeString = s_lastTimeBuf.ToString(); + timeString = s_lastTimeBuf.ToString(); #if NET_1_1 // Ensure that the above string is written into the variable NOW on all threads. @@ -146,7 +146,7 @@ namespace log4net.DateFormatter System.Threading.Thread.MemoryBarrier(); #endif // Store the time as a string (we only have to do this once per second) - s_lastTimeStrings[GetType()] = timeString; + s_lastTimeStrings[GetType()] = timeString; s_lastTimeToTheSecond = currentTimeToTheSecond; } } @@ -165,7 +165,7 @@ namespace log4net.DateFormatter writer.Write('0'); } writer.Write(millis); - } + } } #endregion Implementation of IDateFormatter http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/82c3e389/src/Layout/LayoutSkeleton.cs ---------------------------------------------------------------------- diff --git a/src/Layout/LayoutSkeleton.cs b/src/Layout/LayoutSkeleton.cs index 7d1a614..04b6097 100644 --- a/src/Layout/LayoutSkeleton.cs +++ b/src/Layout/LayoutSkeleton.cs @@ -117,9 +117,9 @@ namespace log4net.Layout /// If any of the configuration properties are modified then /// <see cref="ActivateOptions"/> must be called again. /// </para> - /// <para> - /// This method must be implemented by the subclass. - /// </para> + /// <para> + /// This method must be implemented by the subclass. + /// </para> /// </remarks> abstract public void ActivateOptions(); @@ -140,93 +140,93 @@ namespace log4net.Layout /// </remarks> abstract public void Format(TextWriter writer, LoggingEvent loggingEvent); - /// <summary> - /// Convenience method for easily formatting the logging event into a string variable. - /// </summary> - /// <param name="loggingEvent"></param> - /// <remarks> - /// Creates a new StringWriter instance to store the formatted logging event. - /// </remarks> - public string Format(LoggingEvent loggingEvent) - { - StringWriter writer = new StringWriter(System.Globalization.CultureInfo.InvariantCulture); - Format(writer, loggingEvent); - return writer.ToString(); - } - - /// <summary> - /// The content type output by this layout. - /// </summary> - /// <value>The content type is <c>"text/plain"</c></value> - /// <remarks> - /// <para> - /// The content type output by this layout. - /// </para> - /// <para> - /// This base class uses the value <c>"text/plain"</c>. - /// To change this value a subclass must override this - /// property. - /// </para> - /// </remarks> - virtual public string ContentType - { - get { return "text/plain"; } - } - - /// <summary> - /// The header for the layout format. - /// </summary> - /// <value>the layout header</value> - /// <remarks> - /// <para> - /// The Header text will be appended before any logging events - /// are formatted and appended. - /// </para> - /// </remarks> - virtual public string Header - { - get { return m_header; } - set { m_header = value; } - } - - /// <summary> - /// The footer for the layout format. - /// </summary> - /// <value>the layout footer</value> - /// <remarks> - /// <para> - /// The Footer text will be appended after all the logging events - /// have been formatted and appended. - /// </para> - /// </remarks> - virtual public string Footer - { - get { return m_footer; } - set { m_footer = value; } - } - - /// <summary> - /// Flag indicating if this layout handles exceptions - /// </summary> - /// <value><c>false</c> if this layout handles exceptions</value> - /// <remarks> - /// <para> - /// If this layout handles the exception object contained within - /// <see cref="LoggingEvent"/>, then the layout should return - /// <c>false</c>. Otherwise, if the layout ignores the exception - /// object, then the layout should return <c>true</c>. - /// </para> - /// <para> - /// Set this value to override a this default setting. The default - /// value is <c>true</c>, this layout does not handle the exception. - /// </para> - /// </remarks> - virtual public bool IgnoresException - { - get { return m_ignoresException; } - set { m_ignoresException = value; } - } - - #endregion + /// <summary> + /// Convenience method for easily formatting the logging event into a string variable. + /// </summary> + /// <param name="loggingEvent"></param> + /// <remarks> + /// Creates a new StringWriter instance to store the formatted logging event. + /// </remarks> + public string Format(LoggingEvent loggingEvent) + { + StringWriter writer = new StringWriter(System.Globalization.CultureInfo.InvariantCulture); + Format(writer, loggingEvent); + return writer.ToString(); + } + + /// <summary> + /// The content type output by this layout. + /// </summary> + /// <value>The content type is <c>"text/plain"</c></value> + /// <remarks> + /// <para> + /// The content type output by this layout. + /// </para> + /// <para> + /// This base class uses the value <c>"text/plain"</c>. + /// To change this value a subclass must override this + /// property. + /// </para> + /// </remarks> + virtual public string ContentType + { + get { return "text/plain"; } + } + + /// <summary> + /// The header for the layout format. + /// </summary> + /// <value>the layout header</value> + /// <remarks> + /// <para> + /// The Header text will be appended before any logging events + /// are formatted and appended. + /// </para> + /// </remarks> + virtual public string Header + { + get { return m_header; } + set { m_header = value; } + } + + /// <summary> + /// The footer for the layout format. + /// </summary> + /// <value>the layout footer</value> + /// <remarks> + /// <para> + /// The Footer text will be appended after all the logging events + /// have been formatted and appended. + /// </para> + /// </remarks> + virtual public string Footer + { + get { return m_footer; } + set { m_footer = value; } + } + + /// <summary> + /// Flag indicating if this layout handles exceptions + /// </summary> + /// <value><c>false</c> if this layout handles exceptions</value> + /// <remarks> + /// <para> + /// If this layout handles the exception object contained within + /// <see cref="LoggingEvent"/>, then the layout should return + /// <c>false</c>. Otherwise, if the layout ignores the exception + /// object, then the layout should return <c>true</c>. + /// </para> + /// <para> + /// Set this value to override a this default setting. The default + /// value is <c>true</c>, this layout does not handle the exception. + /// </para> + /// </remarks> + virtual public bool IgnoresException + { + get { return m_ignoresException; } + set { m_ignoresException = value; } + } + + #endregion } } http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/82c3e389/src/Layout/Pattern/AspNetRequestPatternConverter.cs ---------------------------------------------------------------------- diff --git a/src/Layout/Pattern/AspNetRequestPatternConverter.cs b/src/Layout/Pattern/AspNetRequestPatternConverter.cs index 9b7c8a4..9527c51 100644 --- a/src/Layout/Pattern/AspNetRequestPatternConverter.cs +++ b/src/Layout/Pattern/AspNetRequestPatternConverter.cs @@ -54,15 +54,15 @@ namespace log4net.Layout.Pattern /// </remarks> protected override void Convert(TextWriter writer, LoggingEvent loggingEvent, HttpContext httpContext) { - HttpRequest request = null; - try { + HttpRequest request = null; + try { request = httpContext.Request; - } catch (HttpException) { + } catch (HttpException) { // likely a case of running in IIS integrated mode // when inside an Application_Start event. // treat it like a case of the Request // property returning null - } + } if (request != null) { http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/82c3e389/src/Layout/Pattern/DatePatternConverter.cs ---------------------------------------------------------------------- diff --git a/src/Layout/Pattern/DatePatternConverter.cs b/src/Layout/Pattern/DatePatternConverter.cs index 568731f..369d920 100644 --- a/src/Layout/Pattern/DatePatternConverter.cs +++ b/src/Layout/Pattern/DatePatternConverter.cs @@ -173,17 +173,17 @@ namespace log4net.Layout.Pattern } } - #region Private Static Fields + #region Private Static Fields - /// <summary> - /// The fully qualified type of the DatePatternConverter class. - /// </summary> - /// <remarks> - /// Used by the internal logger to record the Type of the - /// log message. - /// </remarks> - private readonly static Type declaringType = typeof(DatePatternConverter); + /// <summary> + /// The fully qualified type of the DatePatternConverter class. + /// </summary> + /// <remarks> + /// Used by the internal logger to record the Type of the + /// log message. + /// </remarks> + private readonly static Type declaringType = typeof(DatePatternConverter); - #endregion Private Static Fields + #endregion Private Static Fields } } http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/82c3e389/src/Layout/Pattern/NamedPatternConverter.cs ---------------------------------------------------------------------- diff --git a/src/Layout/Pattern/NamedPatternConverter.cs b/src/Layout/Pattern/NamedPatternConverter.cs index a919aa9..08a8c9b 100644 --- a/src/Layout/Pattern/NamedPatternConverter.cs +++ b/src/Layout/Pattern/NamedPatternConverter.cs @@ -130,42 +130,42 @@ namespace log4net.Layout.Pattern else { int len = name.Length; - string trailingDot = string.Empty; - if (name.EndsWith(DOT)) - { - trailingDot = DOT; - name = name.Substring(0, len - 1); - len--; - } + string trailingDot = string.Empty; + if (name.EndsWith(DOT)) + { + trailingDot = DOT; + name = name.Substring(0, len - 1); + len--; + } - int end = name.LastIndexOf(DOT); + int end = name.LastIndexOf(DOT); for(int i = 1; end > 0 && i < m_precision; i++) { - end = name.LastIndexOf('.', end - 1); - } - if (end == -1) - { - writer.Write(name + trailingDot); - } - else - { - writer.Write(name.Substring(end + 1, len - end - 1) + trailingDot); - } + end = name.LastIndexOf('.', end - 1); + } + if (end == -1) + { + writer.Write(name + trailingDot); + } + else + { + writer.Write(name.Substring(end + 1, len - end - 1) + trailingDot); + } } } - #region Private Static Fields + #region Private Static Fields - /// <summary> - /// The fully qualified type of the NamedPatternConverter class. - /// </summary> - /// <remarks> - /// Used by the internal logger to record the Type of the - /// log message. - /// </remarks> - private readonly static Type declaringType = typeof(NamedPatternConverter); + /// <summary> + /// The fully qualified type of the NamedPatternConverter class. + /// </summary> + /// <remarks> + /// Used by the internal logger to record the Type of the + /// log message. + /// </remarks> + private readonly static Type declaringType = typeof(NamedPatternConverter); - private const string DOT = "."; - #endregion Private Static Fields + private const string DOT = "."; + #endregion Private Static Fields } } http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/82c3e389/src/Layout/Pattern/StackTraceDetailPatternConverter.cs ---------------------------------------------------------------------- diff --git a/src/Layout/Pattern/StackTraceDetailPatternConverter.cs b/src/Layout/Pattern/StackTraceDetailPatternConverter.cs index 2bc5493..c9bd4ca 100644 --- a/src/Layout/Pattern/StackTraceDetailPatternConverter.cs +++ b/src/Layout/Pattern/StackTraceDetailPatternConverter.cs @@ -29,63 +29,63 @@ using log4net.Core; namespace log4net.Layout.Pattern { - /// <summary> - /// Write the caller stack frames to the output - /// </summary> - /// <remarks> - /// <para> - /// Writes the <see cref="LocationInfo.StackFrames"/> to the output writer, using format: - /// type3.MethodCall3(type param,...) > type2.MethodCall2(type param,...) > type1.MethodCall1(type param,...) - /// </para> - /// </remarks> - /// <author>Adam Davies</author> - internal class StackTraceDetailPatternConverter : StackTracePatternConverter - { - internal override string GetMethodInformation(MethodItem method) - { - string returnValue=""; + /// <summary> + /// Write the caller stack frames to the output + /// </summary> + /// <remarks> + /// <para> + /// Writes the <see cref="LocationInfo.StackFrames"/> to the output writer, using format: + /// type3.MethodCall3(type param,...) > type2.MethodCall2(type param,...) > type1.MethodCall1(type param,...) + /// </para> + /// </remarks> + /// <author>Adam Davies</author> + internal class StackTraceDetailPatternConverter : StackTracePatternConverter + { + internal override string GetMethodInformation(MethodItem method) + { + string returnValue=""; - try - { - string param = ""; - string[] names = method.Parameters; - StringBuilder sb = new StringBuilder(); - if (names != null && names.GetUpperBound(0) > 0) - { - for (int i = 0; i <= names.GetUpperBound(0); i++) - { - sb.AppendFormat("{0}, ", names[i]); - } - } + try + { + string param = ""; + string[] names = method.Parameters; + StringBuilder sb = new StringBuilder(); + if (names != null && names.GetUpperBound(0) > 0) + { + for (int i = 0; i <= names.GetUpperBound(0); i++) + { + sb.AppendFormat("{0}, ", names[i]); + } + } - if (sb.Length > 0) - { - sb.Remove(sb.Length - 2, 2); - param = sb.ToString(); - } + if (sb.Length > 0) + { + sb.Remove(sb.Length - 2, 2); + param = sb.ToString(); + } - returnValue=base.GetMethodInformation(method) + "(" + param + ")"; - } - catch (Exception ex) - { - LogLog.Error(declaringType, "An exception ocurred while retreiving method information.", ex); - } + returnValue=base.GetMethodInformation(method) + "(" + param + ")"; + } + catch (Exception ex) + { + LogLog.Error(declaringType, "An exception ocurred while retreiving method information.", ex); + } - return returnValue; - } + return returnValue; + } - #region Private Static Fields + #region Private Static Fields - /// <summary> - /// The fully qualified type of the StackTraceDetailPatternConverter class. - /// </summary> - /// <remarks> - /// Used by the internal logger to record the Type of the - /// log message. - /// </remarks> - private readonly static Type declaringType = typeof(StackTracePatternConverter); + /// <summary> + /// The fully qualified type of the StackTraceDetailPatternConverter class. + /// </summary> + /// <remarks> + /// Used by the internal logger to record the Type of the + /// log message. + /// </remarks> + private readonly static Type declaringType = typeof(StackTracePatternConverter); - #endregion Private Static Fields - } + #endregion Private Static Fields + } } #endif \ No newline at end of file http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/82c3e389/src/Layout/Pattern/StackTracePatternConverter.cs ---------------------------------------------------------------------- diff --git a/src/Layout/Pattern/StackTracePatternConverter.cs b/src/Layout/Pattern/StackTracePatternConverter.cs index bf80dc2..cd2019d 100644 --- a/src/Layout/Pattern/StackTracePatternConverter.cs +++ b/src/Layout/Pattern/StackTracePatternConverter.cs @@ -112,39 +112,39 @@ namespace log4net.Layout.Pattern } StackFrameItem stackFrame = stackframes[stackFrameIndex]; - writer.Write("{0}.{1}", stackFrame.ClassName, GetMethodInformation(stackFrame.Method)); + writer.Write("{0}.{1}", stackFrame.ClassName, GetMethodInformation(stackFrame.Method)); if (stackFrameIndex > 0) { - // TODO: make this user settable? + // TODO: make this user settable? writer.Write(" > "); } stackFrameIndex--; } } - /// <summary> - /// Returns the Name of the method - /// </summary> - /// <param name="method"></param> - /// <remarks>This method was created, so this class could be used as a base class for StackTraceDetailPatternConverter</remarks> - /// <returns>string</returns> - internal virtual string GetMethodInformation(MethodItem method) - { - return method.Name; - } + /// <summary> + /// Returns the Name of the method + /// </summary> + /// <param name="method"></param> + /// <remarks>This method was created, so this class could be used as a base class for StackTraceDetailPatternConverter</remarks> + /// <returns>string</returns> + internal virtual string GetMethodInformation(MethodItem method) + { + return method.Name; + } #region Private Static Fields - /// <summary> - /// The fully qualified type of the StackTracePatternConverter class. - /// </summary> - /// <remarks> - /// Used by the internal logger to record the Type of the - /// log message. - /// </remarks> - private readonly static Type declaringType = typeof(StackTracePatternConverter); + /// <summary> + /// The fully qualified type of the StackTracePatternConverter class. + /// </summary> + /// <remarks> + /// Used by the internal logger to record the Type of the + /// log message. + /// </remarks> + private readonly static Type declaringType = typeof(StackTracePatternConverter); - #endregion Private Static Fields + #endregion Private Static Fields } } #endif http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/82c3e389/src/Layout/Pattern/UtcDatePatternConverter.cs ---------------------------------------------------------------------- diff --git a/src/Layout/Pattern/UtcDatePatternConverter.cs b/src/Layout/Pattern/UtcDatePatternConverter.cs index 867ed07..614ff29 100644 --- a/src/Layout/Pattern/UtcDatePatternConverter.cs +++ b/src/Layout/Pattern/UtcDatePatternConverter.cs @@ -75,17 +75,17 @@ namespace log4net.Layout.Pattern } } - #region Private Static Fields + #region Private Static Fields - /// <summary> - /// The fully qualified type of the UtcDatePatternConverter class. - /// </summary> - /// <remarks> - /// Used by the internal logger to record the Type of the - /// log message. - /// </remarks> - private readonly static Type declaringType = typeof(UtcDatePatternConverter); + /// <summary> + /// The fully qualified type of the UtcDatePatternConverter class. + /// </summary> + /// <remarks> + /// Used by the internal logger to record the Type of the + /// log message. + /// </remarks> + private readonly static Type declaringType = typeof(UtcDatePatternConverter); - #endregion Private Static Fields + #endregion Private Static Fields } } http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/82c3e389/src/Layout/PatternLayout.cs ---------------------------------------------------------------------- diff --git a/src/Layout/PatternLayout.cs b/src/Layout/PatternLayout.cs index a9140ff..f4ccfe6 100644 --- a/src/Layout/PatternLayout.cs +++ b/src/Layout/PatternLayout.cs @@ -109,46 +109,46 @@ namespace log4net.Layout /// <item> /// <term>aspnet-cache</term> /// <description> - /// <para> - /// Used to output all cache items in the case of <b>%aspnet-cache</b> or just one named item if used as <b>%aspnet-cache{key}</b> - /// </para> - /// <para> - /// This pattern is not available for Compact Framework or Client Profile assemblies. - /// </para> + /// <para> + /// Used to output all cache items in the case of <b>%aspnet-cache</b> or just one named item if used as <b>%aspnet-cache{key}</b> + /// </para> + /// <para> + /// This pattern is not available for Compact Framework or Client Profile assemblies. + /// </para> /// </description> /// </item> /// <item> /// <term>aspnet-context</term> /// <description> - /// <para> - /// Used to output all context items in the case of <b>%aspnet-context</b> or just one named item if used as <b>%aspnet-context{key}</b> - /// </para> - /// <para> - /// This pattern is not available for Compact Framework or Client Profile assemblies. - /// </para> - /// </description> + /// <para> + /// Used to output all context items in the case of <b>%aspnet-context</b> or just one named item if used as <b>%aspnet-context{key}</b> + /// </para> + /// <para> + /// This pattern is not available for Compact Framework or Client Profile assemblies. + /// </para> + /// </description> /// </item> /// <item> /// <term>aspnet-request</term> /// <description> - /// <para> - /// Used to output all request parameters in the case of <b>%aspnet-request</b> or just one named param if used as <b>%aspnet-request{key}</b> - /// </para> - /// <para> - /// This pattern is not available for Compact Framework or Client Profile assemblies. - /// </para> - /// </description> + /// <para> + /// Used to output all request parameters in the case of <b>%aspnet-request</b> or just one named param if used as <b>%aspnet-request{key}</b> + /// </para> + /// <para> + /// This pattern is not available for Compact Framework or Client Profile assemblies. + /// </para> + /// </description> /// </item> /// <item> /// <term>aspnet-session</term> /// <description> - /// <para> - /// Used to output all session items in the case of <b>%aspnet-session</b> or just one named item if used as <b>%aspnet-session{key}</b> - /// </para> - /// <para> - /// This pattern is not available for Compact Framework or Client Profile assemblies. - /// </para> - /// </description> + /// <para> + /// Used to output all session items in the case of <b>%aspnet-session</b> or just one named item if used as <b>%aspnet-session{key}</b> + /// </para> + /// <para> + /// This pattern is not available for Compact Framework or Client Profile assemblies. + /// </para> + /// </description> /// </item> /// <item> /// <term>c</term> @@ -469,34 +469,34 @@ namespace log4net.Layout /// between braces. For example, <b>%stacktrace{level}</b>. /// If no stack trace level specifier is given then 1 is assumed /// </para> - /// <para> - /// Output uses the format: - /// type3.MethodCall3 > type2.MethodCall2 > type1.MethodCall1 - /// </para> - /// <para> - /// This pattern is not available for Compact Framework assemblies. - /// </para> - /// </description> + /// <para> + /// Output uses the format: + /// type3.MethodCall3 > type2.MethodCall2 > type1.MethodCall1 + /// </para> + /// <para> + /// This pattern is not available for Compact Framework assemblies. + /// </para> + /// </description> + /// </item> + /// <item> + /// <term>stacktracedetail</term> + /// <description> + /// <para> + /// Used to output the stack trace of the logging event + /// The stack trace level specifier may be enclosed + /// between braces. For example, <b>%stacktracedetail{level}</b>. + /// If no stack trace level specifier is given then 1 is assumed + /// </para> + /// <para> + /// Output uses the format: + /// type3.MethodCall3(type param,...) > type2.MethodCall2(type param,...) > type1.MethodCall1(type param,...) + /// </para> + /// <para> + /// This pattern is not available for Compact Framework assemblies. + /// </para> + /// </description> /// </item> - /// <item> - /// <term>stacktracedetail</term> - /// <description> - /// <para> - /// Used to output the stack trace of the logging event - /// The stack trace level specifier may be enclosed - /// between braces. For example, <b>%stacktracedetail{level}</b>. - /// If no stack trace level specifier is given then 1 is assumed - /// </para> - /// <para> - /// Output uses the format: - /// type3.MethodCall3(type param,...) > type2.MethodCall2(type param,...) > type1.MethodCall1(type param,...) - /// </para> - /// <para> - /// This pattern is not available for Compact Framework assemblies. - /// </para> - /// </description> - /// </item> - /// <item> + /// <item> /// <term>t</term> /// <description>Equivalent to <b>thread</b></description> /// </item> @@ -910,7 +910,7 @@ namespace log4net.Layout #if !(NETCF || NETSTANDARD1_3) s_globalRulesRegistry.Add("stacktrace", typeof(StackTracePatternConverter)); - s_globalRulesRegistry.Add("stacktracedetail", typeof(StackTraceDetailPatternConverter)); + s_globalRulesRegistry.Add("stacktracedetail", typeof(StackTraceDetailPatternConverter)); #endif s_globalRulesRegistry.Add("t", typeof(ThreadPatternConverter)); @@ -1029,10 +1029,10 @@ namespace log4net.Layout // Add all the builtin patterns foreach(DictionaryEntry entry in s_globalRulesRegistry) { - ConverterInfo converterInfo = new ConverterInfo(); - converterInfo.Name = (string)entry.Key; - converterInfo.Type = (Type)entry.Value; - patternParser.PatternConverters[entry.Key] = converterInfo; + ConverterInfo converterInfo = new ConverterInfo(); + converterInfo.Name = (string)entry.Key; + converterInfo.Type = (Type)entry.Value; + patternParser.PatternConverters[entry.Key] = converterInfo; } // Add the instance patterns foreach(DictionaryEntry entry in m_instanceRulesRegistry) @@ -1133,13 +1133,13 @@ namespace log4net.Layout /// </remarks> public void AddConverter(ConverterInfo converterInfo) { - if (converterInfo == null) throw new ArgumentNullException("converterInfo"); + if (converterInfo == null) throw new ArgumentNullException("converterInfo"); - if (!typeof(PatternConverter).IsAssignableFrom(converterInfo.Type)) - { - throw new ArgumentException("The converter type specified [" + converterInfo.Type + "] must be a subclass of log4net.Util.PatternConverter", "converterInfo"); - } - m_instanceRulesRegistry[converterInfo.Name] = converterInfo; + if (!typeof(PatternConverter).IsAssignableFrom(converterInfo.Type)) + { + throw new ArgumentException("The converter type specified [" + converterInfo.Type + "] must be a subclass of log4net.Util.PatternConverter", "converterInfo"); + } + m_instanceRulesRegistry[converterInfo.Name] = converterInfo; } /// <summary> @@ -1160,14 +1160,14 @@ namespace log4net.Layout /// </remarks> public void AddConverter(string name, Type type) { - if (name == null) throw new ArgumentNullException("name"); - if (type == null) throw new ArgumentNullException("type"); + if (name == null) throw new ArgumentNullException("name"); + if (type == null) throw new ArgumentNullException("type"); - ConverterInfo converterInfo = new ConverterInfo(); - converterInfo.Name = name; - converterInfo.Type = type; + ConverterInfo converterInfo = new ConverterInfo(); + converterInfo.Name = name; + converterInfo.Type = type; - AddConverter(converterInfo); + AddConverter(converterInfo); } } } http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/82c3e389/src/Layout/XmlLayoutSchemaLog4j.cs ---------------------------------------------------------------------- diff --git a/src/Layout/XmlLayoutSchemaLog4j.cs b/src/Layout/XmlLayoutSchemaLog4j.cs index f42bbf8..c7dda6f 100644 --- a/src/Layout/XmlLayoutSchemaLog4j.cs +++ b/src/Layout/XmlLayoutSchemaLog4j.cs @@ -109,16 +109,16 @@ namespace log4net.Layout <log4j:message><![CDATA[errormsg 3]]></log4j:message> <log4j:NDC><![CDATA[third]]></log4j:NDC> <log4j:MDC> - <log4j:data name="some string" value="some valuethird"/> + <log4j:data name="some string" value="some valuethird"/> </log4j:MDC> <log4j:throwable><![CDATA[java.lang.Exception: someexception-third - at org.apache.log4j.chainsaw.Generator.run(Generator.java:94) + at org.apache.log4j.chainsaw.Generator.run(Generator.java:94) ]]></log4j:throwable> <log4j:locationInfo class="org.apache.log4j.chainsaw.Generator" method="run" file="Generator.java" line="94"/> <log4j:properties> - <log4j:data name="log4jmachinename" value="windows"/> - <log4j:data name="log4japp" value="udp-generator"/> + <log4j:data name="log4jmachinename" value="windows"/> + <log4j:data name="log4japp" value="udp-generator"/> </log4j:properties> </log4j:event> http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/82c3e389/src/Log4netAssemblyInfo.cs ---------------------------------------------------------------------- diff --git a/src/Log4netAssemblyInfo.cs b/src/Log4netAssemblyInfo.cs index ec143b7..5c84181 100644 --- a/src/Log4netAssemblyInfo.cs +++ b/src/Log4netAssemblyInfo.cs @@ -19,78 +19,78 @@ namespace log4net { - /// <summary> - /// Provides information about the environment the assembly has - /// been built for. - /// </summary> - public sealed class AssemblyInfo { - /// <summary>Version of the assembly</summary> - public const string Version = "2.0.9"; + /// <summary> + /// Provides information about the environment the assembly has + /// been built for. + /// </summary> + public sealed class AssemblyInfo { + /// <summary>Version of the assembly</summary> + public const string Version = "2.0.9"; - /// <summary>Version of the framework targeted</summary> + /// <summary>Version of the framework targeted</summary> #if NET_1_1 - public const decimal TargetFrameworkVersion = 1.1M; + public const decimal TargetFrameworkVersion = 1.1M; #elif NET_4_5 - public const decimal TargetFrameworkVersion = 4.5M; + public const decimal TargetFrameworkVersion = 4.5M; #elif NET_4_0 || MONO_4_0 - public const decimal TargetFrameworkVersion = 4.5M; + public const decimal TargetFrameworkVersion = 4.5M; #elif FRAMEWORK_4_0_OR_ABOVE - public const decimal TargetFrameworkVersion = 4.0M; + public const decimal TargetFrameworkVersion = 4.0M; #elif MONO_3_5 - public const decimal TargetFrameworkVersion = 3.5M; + public const decimal TargetFrameworkVersion = 3.5M; #elif NET_2_0 || NETCF_2_0 || MONO_2_0 #if !CLIENT_PROFILE - public const decimal TargetFrameworkVersion = 2.0M; + public const decimal TargetFrameworkVersion = 2.0M; #else - public const decimal TargetFrameworkVersion = 3.5M; + public const decimal TargetFrameworkVersion = 3.5M; #endif // Client Profile #else - public const decimal TargetFrameworkVersion = 1.0M; + public const decimal TargetFrameworkVersion = 1.0M; #endif - /// <summary>Type of framework targeted</summary> + /// <summary>Type of framework targeted</summary> #if CLI - public const string TargetFramework = "CLI Compatible Frameworks"; + public const string TargetFramework = "CLI Compatible Frameworks"; #elif NET - public const string TargetFramework = ".NET Framework"; + public const string TargetFramework = ".NET Framework"; #elif NETCF - public const string TargetFramework = ".NET Compact Framework"; + public const string TargetFramework = ".NET Compact Framework"; #elif MONO - public const string TargetFramework = "Mono"; + public const string TargetFramework = "Mono"; #elif SSCLI - public const string TargetFramework = "Shared Source CLI"; + public const string TargetFramework = "Shared Source CLI"; #elif NETSTANDARD1_3 - public const string TargetFramework = ".NET Core"; + public const string TargetFramework = ".NET Core"; #else - public const string TargetFramework = "Unknown"; + public const string TargetFramework = "Unknown"; #endif - /// <summary>Does it target a client profile?</summary> + /// <summary>Does it target a client profile?</summary> #if !CLIENT_PROFILE - public const bool ClientProfile = false; + public const bool ClientProfile = false; #else - public const bool ClientProfile = true; + public const bool ClientProfile = true; #endif - /// <summary> - /// Identifies the version and target for this assembly. - /// </summary> - public static string Info { - get { - return string.Format("Apache log4net version {0} compiled for {1}{2} {3}", - Version, TargetFramework, - /* Can't use - ClientProfile && true ? " Client Profile" : - or the compiler whines about unreachable expressions - */ + /// <summary> + /// Identifies the version and target for this assembly. + /// </summary> + public static string Info { + get { + return string.Format("Apache log4net version {0} compiled for {1}{2} {3}", + Version, TargetFramework, + /* Can't use + ClientProfile && true ? " Client Profile" : + or the compiler whines about unreachable expressions + */ #if !CLIENT_PROFILE - string.Empty, + string.Empty, #else - " Client Profile", + " Client Profile", #endif - TargetFrameworkVersion); - } - } - } + TargetFrameworkVersion); + } + } + } } http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/82c3e389/src/LogManager.cs ---------------------------------------------------------------------- diff --git a/src/LogManager.cs b/src/LogManager.cs index 939a026..2c96943 100644 --- a/src/LogManager.cs +++ b/src/LogManager.cs @@ -128,23 +128,23 @@ namespace log4net } #endif // !NETSTANDARD1_3 - /// <summary> - /// Returns the named logger if it exists. - /// </summary> - /// <remarks> - /// <para> - /// If the named logger exists (in the specified repository) then it - /// returns a reference to the logger, otherwise it returns - /// <c>null</c>. - /// </para> - /// </remarks> - /// <param name="repository">The repository to lookup in.</param> - /// <param name="name">The fully qualified logger name to look for.</param> - /// <returns> - /// The logger found, or <c>null</c> if the logger doesn't exist in the specified - /// repository. - /// </returns> - public static ILog Exists(string repository, string name) + /// <summary> + /// Returns the named logger if it exists. + /// </summary> + /// <remarks> + /// <para> + /// If the named logger exists (in the specified repository) then it + /// returns a reference to the logger, otherwise it returns + /// <c>null</c>. + /// </para> + /// </remarks> + /// <param name="repository">The repository to lookup in.</param> + /// <param name="name">The fully qualified logger name to look for.</param> + /// <returns> + /// The logger found, or <c>null</c> if the logger doesn't exist in the specified + /// repository. + /// </returns> + public static ILog Exists(string repository, string name) { return WrapLogger(LoggerManager.Exists(repository, name)); } @@ -751,27 +751,27 @@ namespace log4net return LoggerManager.GetAllRepositories(); } - /// <summary> - /// Flushes logging events buffered in all configured appenders in the default repository. - /// </summary> - /// <param name="millisecondsTimeout">The maximum time in milliseconds to wait for logging events from asycnhronous appenders to be flushed.</param> - /// <returns><c>True</c> if all logging events were flushed successfully, else <c>false</c>.</returns> - public static bool Flush(int millisecondsTimeout) - { + /// <summary> + /// Flushes logging events buffered in all configured appenders in the default repository. + /// </summary> + /// <param name="millisecondsTimeout">The maximum time in milliseconds to wait for logging events from asycnhronous appenders to be flushed.</param> + /// <returns><c>True</c> if all logging events were flushed successfully, else <c>false</c>.</returns> + public static bool Flush(int millisecondsTimeout) + { #if !NETSTANDARD1_3 // Excluded because GetCallingAssembly() is not available in CoreFX (https://github.com/dotnet/corefx/issues/2221). - Appender.IFlushable flushableRepository = LoggerManager.GetRepository(Assembly.GetCallingAssembly()) as Appender.IFlushable; - if (flushableRepository == null) - { - return false; - } - else - { - return flushableRepository.Flush(millisecondsTimeout); - } + Appender.IFlushable flushableRepository = LoggerManager.GetRepository(Assembly.GetCallingAssembly()) as Appender.IFlushable; + if (flushableRepository == null) + { + return false; + } + else + { + return flushableRepository.Flush(millisecondsTimeout); + } #else - return false; + return false; #endif - } + } #endregion Domain & Repository Manager Methods http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/82c3e389/src/ObjectRenderer/RendererMap.cs ---------------------------------------------------------------------- diff --git a/src/ObjectRenderer/RendererMap.cs b/src/ObjectRenderer/RendererMap.cs index 91833db..ba805ce 100644 --- a/src/ObjectRenderer/RendererMap.cs +++ b/src/ObjectRenderer/RendererMap.cs @@ -45,7 +45,7 @@ namespace log4net.ObjectRenderer /// <author>Gert Driesen</author> public class RendererMap { - private readonly static Type declaringType = typeof(RendererMap); + private readonly static Type declaringType = typeof(RendererMap); #region Member Variables http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/82c3e389/src/Plugin/RemoteLoggingServerPlugin.cs ---------------------------------------------------------------------- diff --git a/src/Plugin/RemoteLoggingServerPlugin.cs b/src/Plugin/RemoteLoggingServerPlugin.cs index 86a984a..3462e6f 100644 --- a/src/Plugin/RemoteLoggingServerPlugin.cs +++ b/src/Plugin/RemoteLoggingServerPlugin.cs @@ -149,9 +149,9 @@ namespace log4net.Plugin /// </para> /// </remarks> #if NET_4_0 || MONO_4_0 - [System.Security.SecuritySafeCritical] + [System.Security.SecuritySafeCritical] #endif - override public void Shutdown() + override public void Shutdown() { // Stops the sink from receiving messages RemotingServices.Disconnect(m_sink); @@ -169,18 +169,18 @@ namespace log4net.Plugin #endregion Private Instance Fields - #region Private Static Fields + #region Private Static Fields - /// <summary> - /// The fully qualified type of the RemoteLoggingServerPlugin class. - /// </summary> - /// <remarks> - /// Used by the internal logger to record the Type of the - /// log message. - /// </remarks> - private readonly static Type declaringType = typeof(RemoteLoggingServerPlugin); + /// <summary> + /// The fully qualified type of the RemoteLoggingServerPlugin class. + /// </summary> + /// <remarks> + /// Used by the internal logger to record the Type of the + /// log message. + /// </remarks> + private readonly static Type declaringType = typeof(RemoteLoggingServerPlugin); - #endregion Private Static Fields + #endregion Private Static Fields /// <summary> /// Delivers <see cref="LoggingEvent"/> objects to a remote sink. @@ -254,9 +254,9 @@ namespace log4net.Plugin /// </para> /// </remarks> #if NET_4_0 || MONO_4_0 - [System.Security.SecurityCritical] + [System.Security.SecurityCritical] #endif - public override object InitializeLifetimeService() + public override object InitializeLifetimeService() { return null; } http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/82c3e389/src/Repository/ConfigurationChangedEventArgs.cs ---------------------------------------------------------------------- diff --git a/src/Repository/ConfigurationChangedEventArgs.cs b/src/Repository/ConfigurationChangedEventArgs.cs index da4ccf3..fada00c 100644 --- a/src/Repository/ConfigurationChangedEventArgs.cs +++ b/src/Repository/ConfigurationChangedEventArgs.cs @@ -24,28 +24,28 @@ using System.Collections; namespace log4net.Repository { - /// <summary> - /// - /// </summary> - public class ConfigurationChangedEventArgs : EventArgs - { - private readonly ICollection configurationMessages; + /// <summary> + /// + /// </summary> + public class ConfigurationChangedEventArgs : EventArgs + { + private readonly ICollection configurationMessages; - /// <summary> - /// - /// </summary> - /// <param name="configurationMessages"></param> - public ConfigurationChangedEventArgs(ICollection configurationMessages) - { - this.configurationMessages = configurationMessages; - } + /// <summary> + /// + /// </summary> + /// <param name="configurationMessages"></param> + public ConfigurationChangedEventArgs(ICollection configurationMessages) + { + this.configurationMessages = configurationMessages; + } - /// <summary> - /// - /// </summary> - public ICollection ConfigurationMessages - { - get { return configurationMessages; } - } - } + /// <summary> + /// + /// </summary> + public ICollection ConfigurationMessages + { + get { return configurationMessages; } + } + } } http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/82c3e389/src/Repository/Hierarchy/Hierarchy.cs ---------------------------------------------------------------------- diff --git a/src/Repository/Hierarchy/Hierarchy.cs b/src/Repository/Hierarchy/Hierarchy.cs index 73d98d7..c45a56a 100644 --- a/src/Repository/Hierarchy/Hierarchy.cs +++ b/src/Repository/Hierarchy/Hierarchy.cs @@ -510,9 +510,9 @@ namespace log4net.Repository.Hierarchy #endregion Override Implementation of LoggerRepositorySkeleton - #region Private Static Methods + #region Private Static Methods - /// <summary> + /// <summary> /// Collect the appenders from an <see cref="IAppenderAttachable"/>. /// The appender may also be a container. /// </summary> @@ -543,13 +543,13 @@ namespace log4net.Repository.Hierarchy { CollectAppender(appenderList, appender); } - } + } - #endregion + #endregion - #region Implementation of IBasicRepositoryConfigurator + #region Implementation of IBasicRepositoryConfigurator - /// <summary> + /// <summary> /// Initialize the log4net system using the specified appender /// </summary> /// <param name="appender">the appender to use to log all logging events</param> @@ -558,14 +558,14 @@ namespace log4net.Repository.Hierarchy BasicRepositoryConfigure(appender); } - /// <summary> - /// Initialize the log4net system using the specified appenders - /// </summary> - /// <param name="appenders">the appenders to use to log all logging events</param> - void IBasicRepositoryConfigurator.Configure(params IAppender[] appenders) - { - BasicRepositoryConfigure(appenders); - } + /// <summary> + /// Initialize the log4net system using the specified appenders + /// </summary> + /// <param name="appenders">the appenders to use to log all logging events</param> + void IBasicRepositoryConfigurator.Configure(params IAppender[] appenders) + { + BasicRepositoryConfigure(appenders); + } /// <summary> /// Initialize the log4net system using the specified appenders @@ -580,25 +580,25 @@ namespace log4net.Repository.Hierarchy /// </remarks> protected void BasicRepositoryConfigure(params IAppender[] appenders) { - ArrayList configurationMessages = new ArrayList(); + ArrayList configurationMessages = new ArrayList(); - using (new LogLog.LogReceivedAdapter(configurationMessages)) - { - foreach (IAppender appender in appenders) - { - Root.AddAppender(appender); - } - } + using (new LogLog.LogReceivedAdapter(configurationMessages)) + { + foreach (IAppender appender in appenders) + { + Root.AddAppender(appender); + } + } - Configured = true; + Configured = true; - ConfigurationMessages = configurationMessages; + ConfigurationMessages = configurationMessages; // Notify listeners - OnConfigurationChanged(new ConfigurationChangedEventArgs(configurationMessages)); + OnConfigurationChanged(new ConfigurationChangedEventArgs(configurationMessages)); } - #endregion Implementation of IBasicRepositoryConfigurator + #endregion Implementation of IBasicRepositoryConfigurator #region Implementation of IXmlRepositoryConfigurator @@ -624,20 +624,20 @@ namespace log4net.Repository.Hierarchy /// </remarks> protected void XmlRepositoryConfigure(System.Xml.XmlElement element) { - ArrayList configurationMessages = new ArrayList(); + ArrayList configurationMessages = new ArrayList(); - using (new LogLog.LogReceivedAdapter(configurationMessages)) - { - XmlHierarchyConfigurator config = new XmlHierarchyConfigurator(this); - config.Configure(element); - } + using (new LogLog.LogReceivedAdapter(configurationMessages)) + { + XmlHierarchyConfigurator config = new XmlHierarchyConfigurator(this); + config.Configure(element); + } - Configured = true; + Configured = true; - ConfigurationMessages = configurationMessages; + ConfigurationMessages = configurationMessages; // Notify listeners - OnConfigurationChanged(new ConfigurationChangedEventArgs(configurationMessages)); + OnConfigurationChanged(new ConfigurationChangedEventArgs(configurationMessages)); } #endregion Implementation of IXmlRepositoryConfigurator @@ -877,9 +877,9 @@ namespace log4net.Repository.Hierarchy } } if (i == 0) { - // logger name starts with a dot - // and we've hit the start - break; + // logger name starts with a dot + // and we've hit the start + break; } } @@ -1066,21 +1066,21 @@ namespace log4net.Repository.Hierarchy private bool m_emittedNoAppenderWarning = false; - private event LoggerCreationEventHandler m_loggerCreatedEvent; + private event LoggerCreationEventHandler m_loggerCreatedEvent; #endregion Private Instance Fields - #region Private Static Fields + #region Private Static Fields - /// <summary> - /// The fully qualified type of the Hierarchy class. - /// </summary> - /// <remarks> - /// Used by the internal logger to record the Type of the - /// log message. - /// </remarks> - private readonly static Type declaringType = typeof(Hierarchy); + /// <summary> + /// The fully qualified type of the Hierarchy class. + /// </summary> + /// <remarks> + /// Used by the internal logger to record the Type of the + /// log message. + /// </remarks> + private readonly static Type declaringType = typeof(Hierarchy); - #endregion Private Static Fields + #endregion Private Static Fields } } http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/82c3e389/src/Repository/Hierarchy/Logger.cs ---------------------------------------------------------------------- diff --git a/src/Repository/Hierarchy/Logger.cs b/src/Repository/Hierarchy/Logger.cs index e675335..d65be9b 100644 --- a/src/Repository/Hierarchy/Logger.cs +++ b/src/Repository/Hierarchy/Logger.cs @@ -425,7 +425,7 @@ namespace log4net.Repository.Hierarchy { if (IsEnabledFor(level)) { - ForcedLog((callerStackBoundaryDeclaringType != null) ? callerStackBoundaryDeclaringType : declaringType, level, message, exception); + ForcedLog((callerStackBoundaryDeclaringType != null) ? callerStackBoundaryDeclaringType : declaringType, level, message, exception); } } catch (Exception ex) @@ -536,7 +536,7 @@ namespace log4net.Repository.Hierarchy get { return m_hierarchy; } } - #endregion Implementation of ILogger + #endregion Implementation of ILogger /// <summary> /// Deliver the <see cref="LoggingEvent"/> to the attached appenders. @@ -665,7 +665,7 @@ namespace log4net.Repository.Hierarchy { if (IsEnabledFor(level)) { - ForcedLog(declaringType, level, message, exception); + ForcedLog(declaringType, level, message, exception); } } @@ -709,10 +709,10 @@ namespace log4net.Repository.Hierarchy #region Private Static Fields - /// <summary> - /// The fully qualified type of the Logger class. - /// </summary> - private readonly static Type declaringType = typeof(Logger); + /// <summary> + /// The fully qualified type of the Logger class. + /// </summary> + private readonly static Type declaringType = typeof(Logger); #endregion Private Static Fields http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/82c3e389/src/Repository/Hierarchy/RootLogger.cs ---------------------------------------------------------------------- diff --git a/src/Repository/Hierarchy/RootLogger.cs b/src/Repository/Hierarchy/RootLogger.cs index 1e818a2..e839817 100644 --- a/src/Repository/Hierarchy/RootLogger.cs +++ b/src/Repository/Hierarchy/RootLogger.cs @@ -117,17 +117,17 @@ namespace log4net.Repository.Hierarchy #endregion Override implementation of Logger - #region Private Static Fields + #region Private Static Fields - /// <summary> - /// The fully qualified type of the RootLogger class. - /// </summary> - /// <remarks> - /// Used by the internal logger to record the Type of the - /// log message. - /// </remarks> - private readonly static Type declaringType = typeof(RootLogger); + /// <summary> + /// The fully qualified type of the RootLogger class. + /// </summary> + /// <remarks> + /// Used by the internal logger to record the Type of the + /// log message. + /// </remarks> + private readonly static Type declaringType = typeof(RootLogger); - #endregion Private Static Fields + #endregion Private Static Fields } } http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/82c3e389/src/Repository/Hierarchy/XmlHierarchyConfigurator.cs ---------------------------------------------------------------------- diff --git a/src/Repository/Hierarchy/XmlHierarchyConfigurator.cs b/src/Repository/Hierarchy/XmlHierarchyConfigurator.cs index 5c7a96a..064b5e6 100644 --- a/src/Repository/Hierarchy/XmlHierarchyConfigurator.cs +++ b/src/Repository/Hierarchy/XmlHierarchyConfigurator.cs @@ -83,7 +83,7 @@ namespace log4net.Repository.Hierarchy { if (element == null || m_hierarchy == null) { - return; + return; } string rootElementName = element.LocalName; @@ -91,26 +91,26 @@ namespace log4net.Repository.Hierarchy if (rootElementName != CONFIGURATION_TAG) { LogLog.Error(declaringType, "Xml element is - not a <" + CONFIGURATION_TAG + "> element."); - return; + return; + } + + if (!LogLog.EmitInternalMessages) + { + // Look for a emitDebug attribute to enable internal debug + string emitDebugAttribute = element.GetAttribute(EMIT_INTERNAL_DEBUG_ATTR); + LogLog.Debug(declaringType, EMIT_INTERNAL_DEBUG_ATTR + " attribute [" + emitDebugAttribute + "]."); + + if (emitDebugAttribute.Length > 0 && emitDebugAttribute != "null") + { + LogLog.EmitInternalMessages = OptionConverter.ToBoolean(emitDebugAttribute, true); + } + else + { + LogLog.Debug(declaringType, "Ignoring " + EMIT_INTERNAL_DEBUG_ATTR + " attribute."); + } } - if (!LogLog.EmitInternalMessages) - { - // Look for a emitDebug attribute to enable internal debug - string emitDebugAttribute = element.GetAttribute(EMIT_INTERNAL_DEBUG_ATTR); - LogLog.Debug(declaringType, EMIT_INTERNAL_DEBUG_ATTR + " attribute [" + emitDebugAttribute + "]."); - - if (emitDebugAttribute.Length > 0 && emitDebugAttribute != "null") - { - LogLog.EmitInternalMessages = OptionConverter.ToBoolean(emitDebugAttribute, true); - } - else - { - LogLog.Debug(declaringType, "Ignoring " + EMIT_INTERNAL_DEBUG_ATTR + " attribute."); - } - } - - if (!LogLog.InternalDebugging) + if (!LogLog.InternalDebugging) { // Look for a debug attribute to enable internal debug string debugAttribute = element.GetAttribute(INTERNAL_DEBUG_ATTR); @@ -223,7 +223,7 @@ namespace log4net.Repository.Hierarchy // Done reading config } - #endregion Public Instance Methods + #endregion Public Instance Methods #region Protected Instance Methods @@ -642,10 +642,10 @@ namespace log4net.Repository.Hierarchy try { // Expand environment variables in the string. - IDictionary environmentVariables = Environment.GetEnvironmentVariables(); - if (HasCaseInsensitiveEnvironment) { + IDictionary environmentVariables = Environment.GetEnvironmentVariables(); + if (HasCaseInsensitiveEnvironment) { environmentVariables = CreateCaseInsensitiveWrapper(environmentVariables); - } + } propertyValue = OptionConverter.SubstituteVariables(propertyValue, environmentVariables); } catch(System.Security.SecurityException) @@ -902,7 +902,7 @@ namespace log4net.Repository.Hierarchy string methodInfoName = methInfo.Name; if (SystemInfo.EqualsIgnoringCase(methodInfoName, requiredMethodNameA) || - SystemInfo.EqualsIgnoringCase(methodInfoName, requiredMethodNameB)) + SystemInfo.EqualsIgnoringCase(methodInfoName, requiredMethodNameB)) { // Found matching method name @@ -1068,9 +1068,9 @@ namespace log4net.Repository.Hierarchy #if !(NETCF || NETSTANDARD1_3) // NETSTANDARD1_3: System.Runtime.InteropServices.RuntimeInformation not available on desktop 4.6 private bool HasCaseInsensitiveEnvironment - { - get - { + { + get + { #if NET_1_0 || NET_1_1 || CLI_1_0 // actually there is no guarantee, but we don't know better return true; @@ -1081,20 +1081,20 @@ namespace log4net.Repository.Hierarchy PlatformID platform = Environment.OSVersion.Platform; return platform != PlatformID.Unix && platform != PlatformID.MacOSX; #endif - } + } } - private IDictionary CreateCaseInsensitiveWrapper(IDictionary dict) - { - if (dict == null) - { + private IDictionary CreateCaseInsensitiveWrapper(IDictionary dict) + { + if (dict == null) + { return dict; - } - Hashtable hash = SystemInfo.CreateCaseInsensitiveHashtable(); - foreach (DictionaryEntry entry in dict) { + } + Hashtable hash = SystemInfo.CreateCaseInsensitiveHashtable(); + foreach (DictionaryEntry entry in dict) { hash[entry.Key] = entry.Value; - } - return hash; + } + return hash; } #endif @@ -1147,17 +1147,17 @@ namespace log4net.Repository.Hierarchy #endregion Private Instance Fields - #region Private Static Fields + #region Private Static Fields - /// <summary> - /// The fully qualified type of the XmlHierarchyConfigurator class. - /// </summary> - /// <remarks> - /// Used by the internal logger to record the Type of the - /// log message. - /// </remarks> - private readonly static Type declaringType = typeof(XmlHierarchyConfigurator); + /// <summary> + /// The fully qualified type of the XmlHierarchyConfigurator class. + /// </summary> + /// <remarks> + /// Used by the internal logger to record the Type of the + /// log message. + /// </remarks> + private readonly static Type declaringType = typeof(XmlHierarchyConfigurator); - #endregion Private Static Fields + #endregion Private Static Fields } } http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/82c3e389/src/Repository/IBasicRepositoryConfigurator.cs ---------------------------------------------------------------------- diff --git a/src/Repository/IBasicRepositoryConfigurator.cs b/src/Repository/IBasicRepositoryConfigurator.cs index 50d710a..0fd5d7b 100644 --- a/src/Repository/IBasicRepositoryConfigurator.cs +++ b/src/Repository/IBasicRepositoryConfigurator.cs @@ -46,18 +46,18 @@ namespace log4net.Repository /// specified appender. /// </para> /// </remarks> - void Configure(Appender.IAppender appender); + void Configure(Appender.IAppender appender); - /// <summary> - /// Initialize the repository using the specified appenders - /// </summary> - /// <param name="appenders">the appenders to use to log all logging events</param> - /// <remarks> - /// <para> - /// Configure the repository to route all logging events to the - /// specified appenders. - /// </para> - /// </remarks> - void Configure(params Appender.IAppender[] appenders); + /// <summary> + /// Initialize the repository using the specified appenders + /// </summary> + /// <param name="appenders">the appenders to use to log all logging events</param> + /// <remarks> + /// <para> + /// Configure the repository to route all logging events to the + /// specified appenders. + /// </para> + /// </remarks> + void Configure(params Appender.IAppender[] appenders); } } http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/82c3e389/src/Repository/ILoggerRepository.cs ---------------------------------------------------------------------- diff --git a/src/Repository/ILoggerRepository.cs b/src/Repository/ILoggerRepository.cs index 64e923f..a878b55 100644 --- a/src/Repository/ILoggerRepository.cs +++ b/src/Repository/ILoggerRepository.cs @@ -74,7 +74,7 @@ namespace log4net.Repository /// </remarks> public delegate void LoggerRepositoryConfigurationChangedEventHandler(object sender, EventArgs e); - #endregion + #endregion /// <summary> /// Interface implemented by logger repositories. @@ -276,11 +276,11 @@ namespace log4net.Repository /// </remarks> bool Configured { get; set; } - /// <summary> - /// Collection of internal messages captured during the most - /// recent configuration process. - /// </summary> - ICollection ConfigurationMessages { get; set; } + /// <summary> + /// Collection of internal messages captured during the most + /// recent configuration process. + /// </summary> + ICollection ConfigurationMessages { get; set; } /// <summary> /// Event to notify that the repository has been shutdown. http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/82c3e389/src/Repository/LoggerRepositorySkeleton.cs ---------------------------------------------------------------------- diff --git a/src/Repository/LoggerRepositorySkeleton.cs b/src/Repository/LoggerRepositorySkeleton.cs index 7170354..035835a 100644 --- a/src/Repository/LoggerRepositorySkeleton.cs +++ b/src/Repository/LoggerRepositorySkeleton.cs @@ -51,7 +51,7 @@ namespace log4net.Repository private LevelMap m_levelMap; private Level m_threshold; private bool m_configured; - private ICollection m_configurationMessages; + private ICollection m_configurationMessages; private event LoggerRepositoryShutdownEventHandler m_shutdownEvent; private event LoggerRepositoryConfigurationResetEventHandler m_configurationResetEvent; private event LoggerRepositoryConfigurationChangedEventHandler m_configurationChangedEvent; @@ -88,7 +88,7 @@ namespace log4net.Repository m_rendererMap = new RendererMap(); m_pluginMap = new PluginMap(this); m_levelMap = new LevelMap(); - m_configurationMessages = EmptyCollection.Instance; + m_configurationMessages = EmptyCollection.Instance; m_configured = false; AddBuiltinLevels(); @@ -288,7 +288,7 @@ namespace log4net.Repository // Clear internal data structures m_rendererMap.Clear(); m_levelMap.Clear(); - m_configurationMessages = EmptyCollection.Instance; + m_configurationMessages = EmptyCollection.Instance; // Add the predefined levels to the map AddBuiltinLevels(); @@ -334,17 +334,17 @@ namespace log4net.Repository set { m_configured = value; } } - /// <summary> - /// Contains a list of internal messages captures during the - /// last configuration. - /// </summary> - virtual public ICollection ConfigurationMessages - { - get { return m_configurationMessages; } - set { m_configurationMessages = value; } - } - - /// <summary> + /// <summary> + /// Contains a list of internal messages captures during the + /// last configuration. + /// </summary> + virtual public ICollection ConfigurationMessages + { + get { return m_configurationMessages; } + set { m_configurationMessages = value; } + } + + /// <summary> /// Event to notify that the repository has been shutdown. /// </summary> /// <value> @@ -423,18 +423,18 @@ namespace log4net.Repository #endregion - #region Private Static Fields + #region Private Static Fields - /// <summary> - /// The fully qualified type of the LoggerRepositorySkeleton class. - /// </summary> - /// <remarks> - /// Used by the internal logger to record the Type of the - /// log message. - /// </remarks> - private readonly static Type declaringType = typeof(LoggerRepositorySkeleton); + /// <summary> + /// The fully qualified type of the LoggerRepositorySkeleton class. + /// </summary> + /// <remarks> + /// Used by the internal logger to record the Type of the + /// log message. + /// </remarks> + private readonly static Type declaringType = typeof(LoggerRepositorySkeleton); - #endregion Private Static Fields + #endregion Private Static Fields private void AddBuiltinLevels() { @@ -575,58 +575,58 @@ namespace log4net.Repository OnConfigurationChanged(e); } - private static int GetWaitTime(DateTime startTimeUtc, int millisecondsTimeout) - { - if (millisecondsTimeout == Timeout.Infinite) return Timeout.Infinite; - if (millisecondsTimeout == 0) return 0; - - int elapsedMilliseconds = (int)(DateTime.UtcNow - startTimeUtc).TotalMilliseconds; - int timeout = millisecondsTimeout - elapsedMilliseconds; - if (timeout < 0) timeout = 0; - return timeout; - } - - /// <summary> - /// Flushes all configured Appenders that implement <see cref="log4net.Appender.IFlushable"/>. - /// </summary> - /// <param name="millisecondsTimeout">The maximum time in milliseconds to wait for logging events from asycnhronous appenders to be flushed, - /// or <see cref="Timeout.Infinite"/> to wait indefinitely.</param> - /// <returns><c>True</c> if all logging events were flushed successfully, else <c>false</c>.</returns> - public bool Flush(int millisecondsTimeout) - { - if (millisecondsTimeout < -1) throw new ArgumentOutOfRangeException("millisecondsTimeout", "Timeout must be -1 (Timeout.Infinite) or non-negative"); - - // Assume success until one of the appenders fails - bool result = true; - - // Use DateTime.UtcNow rather than a System.Diagnostics.Stopwatch for compatibility with .NET 1.x - DateTime startTimeUtc = DateTime.UtcNow; - - // Do buffering appenders first. These may be forwarding to other appenders - foreach(log4net.Appender.IAppender appender in GetAppenders()) - { - log4net.Appender.IFlushable flushable = appender as log4net.Appender.IFlushable; - if (flushable == null) continue; - if (appender is Appender.BufferingAppenderSkeleton) - { - int timeout = GetWaitTime(startTimeUtc, millisecondsTimeout); - if (!flushable.Flush(timeout)) result = false; - } - } - - // Do non-buffering appenders. - foreach (log4net.Appender.IAppender appender in GetAppenders()) - { - log4net.Appender.IFlushable flushable = appender as log4net.Appender.IFlushable; - if (flushable == null) continue; - if (!(appender is Appender.BufferingAppenderSkeleton)) - { - int timeout = GetWaitTime(startTimeUtc, millisecondsTimeout); - if (!flushable.Flush(timeout)) result = false; - } - } - - return result; - } + private static int GetWaitTime(DateTime startTimeUtc, int millisecondsTimeout) + { + if (millisecondsTimeout == Timeout.Infinite) return Timeout.Infinite; + if (millisecondsTimeout == 0) return 0; + + int elapsedMilliseconds = (int)(DateTime.UtcNow - startTimeUtc).TotalMilliseconds; + int timeout = millisecondsTimeout - elapsedMilliseconds; + if (timeout < 0) timeout = 0; + return timeout; + } + + /// <summary> + /// Flushes all configured Appenders that implement <see cref="log4net.Appender.IFlushable"/>. + /// </summary> + /// <param name="millisecondsTimeout">The maximum time in milliseconds to wait for logging events from asycnhronous appenders to be flushed, + /// or <see cref="Timeout.Infinite"/> to wait indefinitely.</param> + /// <returns><c>True</c> if all logging events were flushed successfully, else <c>false</c>.</returns> + public bool Flush(int millisecondsTimeout) + { + if (millisecondsTimeout < -1) throw new ArgumentOutOfRangeException("millisecondsTimeout", "Timeout must be -1 (Timeout.Infinite) or non-negative"); + + // Assume success until one of the appenders fails + bool result = true; + + // Use DateTime.UtcNow rather than a System.Diagnostics.Stopwatch for compatibility with .NET 1.x + DateTime startTimeUtc = DateTime.UtcNow; + + // Do buffering appenders first. These may be forwarding to other appenders + foreach(log4net.Appender.IAppender appender in GetAppenders()) + { + log4net.Appender.IFlushable flushable = appender as log4net.Appender.IFlushable; + if (flushable == null) continue; + if (appender is Appender.BufferingAppenderSkeleton) + { + int timeout = GetWaitTime(startTimeUtc, millisecondsTimeout); + if (!flushable.Flush(timeout)) result = false; + } + } + + // Do non-buffering appenders. + foreach (log4net.Appender.IAppender appender in GetAppenders()) + { + log4net.Appender.IFlushable flushable = appender as log4net.Appender.IFlushable; + if (flushable == null) continue; + if (!(appender is Appender.BufferingAppenderSkeleton)) + { + int timeout = GetWaitTime(startTimeUtc, millisecondsTimeout); + if (!flushable.Flush(timeout)) result = false; + } + } + + return result; + } } } http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/82c3e389/src/Util/AppenderAttachedImpl.cs ---------------------------------------------------------------------- diff --git a/src/Util/AppenderAttachedImpl.cs b/src/Util/AppenderAttachedImpl.cs index 6c17096..f374db1 100644 --- a/src/Util/AppenderAttachedImpl.cs +++ b/src/Util/AppenderAttachedImpl.cs @@ -153,9 +153,9 @@ namespace log4net.Util #endregion Public Instance Methods - #region Private Static Methods + #region Private Static Methods - /// <summary> + /// <summary> /// Calls the DoAppende method on the <see cref="IAppender"/> with /// the <see cref="LoggingEvent"/> objects supplied. /// </summary> @@ -183,13 +183,13 @@ namespace log4net.Util appender.DoAppend(loggingEvent); } } - } + } - #endregion + #endregion - #region Implementation of IAppenderAttachable + #region Implementation of IAppenderAttachable - /// <summary> + /// <summary> /// Attaches an appender. /// </summary> /// <param name="newAppender">The appender to add.</param> @@ -360,17 +360,17 @@ namespace log4net.Util #endregion Private Instance Fields - #region Private Static Fields + #region Private Static Fields - /// <summary> - /// The fully qualified type of the AppenderAttachedImpl class. - /// </summary> - /// <remarks> - /// Used by the internal logger to record the Type of the - /// log message. - /// </remarks> - private readonly static Type declaringType = typeof(AppenderAttachedImpl); + /// <summary> + /// The fully qualified type of the AppenderAttachedImpl class. + /// </summary> + /// <remarks> + /// Used by the internal logger to record the Type of the + /// log message. + /// </remarks> + private readonly static Type declaringType = typeof(AppenderAttachedImpl); - #endregion Private Static Fields + #endregion Private Static Fields } } http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/82c3e389/src/Util/ConverterInfo.cs ---------------------------------------------------------------------- diff --git a/src/Util/ConverterInfo.cs b/src/Util/ConverterInfo.cs index 014fac7..f0e656c 100644 --- a/src/Util/ConverterInfo.cs +++ b/src/Util/ConverterInfo.cs @@ -23,72 +23,72 @@ using System; namespace log4net.Util { - /// <summary> - /// Wrapper class used to map converter names to converter types - /// </summary> - /// <remarks> - /// <para> - /// Pattern converter info class used during configuration by custom - /// PatternString and PatternLayer converters. - /// </para> - /// </remarks> - public sealed class ConverterInfo - { - private string m_name; - private Type m_type; - private readonly PropertiesDictionary properties = new PropertiesDictionary(); + /// <summary> + /// Wrapper class used to map converter names to converter types + /// </summary> + /// <remarks> + /// <para> + /// Pattern converter info class used during configuration by custom + /// PatternString and PatternLayer converters. + /// </para> + /// </remarks> + public sealed class ConverterInfo + { + private string m_name; + private Type m_type; + private readonly PropertiesDictionary properties = new PropertiesDictionary(); - /// <summary> - /// default constructor - /// </summary> - public ConverterInfo() - { - } + /// <summary> + /// default constructor + /// </summary> + public ConverterInfo() + { + } - /// <summary> - /// Gets or sets the name of the conversion pattern - /// </summary> - /// <remarks> - /// <para> - /// The name of the pattern in the format string - /// </para> - /// </remarks> - public string Name - { - get { return m_name; } - set { m_name = value; } - } + /// <summary> + /// Gets or sets the name of the conversion pattern + /// </summary> + /// <remarks> + /// <para> + /// The name of the pattern in the format string + /// </para> + /// </remarks> + public string Name + { + get { return m_name; } + set { m_name = value; } + } - /// <summary> - /// Gets or sets the type of the converter - /// </summary> - /// <remarks> - /// <para> - /// The value specified must extend the - /// <see cref="PatternConverter"/> type. - /// </para> - /// </remarks> - public Type Type - { - get { return m_type; } - set { m_type = value; } - } + /// <summary> + /// Gets or sets the type of the converter + /// </summary> + /// <remarks> + /// <para> + /// The value specified must extend the + /// <see cref="PatternConverter"/> type. + /// </para> + /// </remarks> + public Type Type + { + get { return m_type; } + set { m_type = value; } + } - /// <summary> - /// - /// </summary> - /// <param name="entry"></param> - public void AddProperty(PropertyEntry entry) - { - properties[entry.Key] = entry.Value; - } + /// <summary> + /// + /// </summary> + /// <param name="entry"></param> + public void AddProperty(PropertyEntry entry) + { + properties[entry.Key] = entry.Value; + } - /// <summary> - /// - /// </summary> - public PropertiesDictionary Properties - { - get { return properties; } - } - } + /// <summary> + /// + /// </summary> + public PropertiesDictionary Properties + { + get { return properties; } + } + } }