http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/8a5b4204/src/Layout/PatternLayout.cs ---------------------------------------------------------------------- diff --git a/src/Layout/PatternLayout.cs b/src/Layout/PatternLayout.cs index 31a5644..a9140ff 100644 --- a/src/Layout/PatternLayout.cs +++ b/src/Layout/PatternLayout.cs @@ -1,10 +1,10 @@ #region Apache License // -// Licensed to the Apache Software Foundation (ASF) under one or more +// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright ownership. +// this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, Version 2.0 -// (the "License"); you may not use this file except in compliance with +// (the "License"); you may not use this file except in compliance with // the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 @@ -42,7 +42,7 @@ namespace log4net.Layout /// </summary> /// <remarks> /// <para> - /// The goal of this class is to <see cref="M:PatternLayout.Format(TextWriter,LoggingEvent)"/> a + /// The goal of this class is to <see cref="M:PatternLayout.Format(TextWriter,LoggingEvent)"/> a /// <see cref="LoggingEvent"/> as a string. The results /// depend on the <i>conversion pattern</i>. /// </para> @@ -72,12 +72,12 @@ namespace log4net.Layout /// <code lang="C#"> /// ILog log = LogManager.GetLogger(typeof(TestApp)); /// log.Debug("Message 1"); - /// log.Warn("Message 2"); + /// log.Warn("Message 2"); /// </code> /// <para>would yield the output</para> /// <code> /// DEBUG [main]: Message 1 - /// WARN [main]: Message 2 + /// WARN [main]: Message 2 /// </code> /// <para> /// Note that there is no explicit separator between text and @@ -102,8 +102,8 @@ namespace log4net.Layout /// <item> /// <term>appdomain</term> /// <description> - /// Used to output the friendly name of the AppDomain where the - /// logging event was generated. + /// Used to output the friendly name of the AppDomain where the + /// logging event was generated. /// </description> /// </item> /// <item> @@ -167,15 +167,15 @@ namespace log4net.Layout /// <description>Equivalent to <b>date</b></description> /// </item> /// <item> - /// <term>date</term> + /// <term>date</term> /// <description> /// <para> - /// Used to output the date of the logging event in the local time zone. + /// Used to output the date of the logging event in the local time zone. /// To output the date in universal time use the <c>%utcdate</c> pattern. - /// The date conversion - /// specifier may be followed by a <i>date format specifier</i> enclosed + /// The date conversion + /// specifier may be followed by a <i>date format specifier</i> enclosed /// between braces. For example, <b>%date{HH:mm:ss,fff}</b> or - /// <b>%date{dd MMM yyyy HH:mm:ss,fff}</b>. If no date format specifier is + /// <b>%date{dd MMM yyyy HH:mm:ss,fff}</b>. If no date format specifier is /// given then ISO8601 format is /// assumed (<see cref="log4net.DateFormatter.Iso8601DateFormatter"/>). /// </para> @@ -186,10 +186,10 @@ namespace log4net.Layout /// <para> /// For better results it is recommended to use the log4net date /// formatters. These can be specified using one of the strings - /// "ABSOLUTE", "DATE" and "ISO8601" for specifying - /// <see cref="log4net.DateFormatter.AbsoluteTimeDateFormatter"/>, - /// <see cref="log4net.DateFormatter.DateTimeDateFormatter"/> and respectively - /// <see cref="log4net.DateFormatter.Iso8601DateFormatter"/>. For example, + /// "ABSOLUTE", "DATE" and "ISO8601" for specifying + /// <see cref="log4net.DateFormatter.AbsoluteTimeDateFormatter"/>, + /// <see cref="log4net.DateFormatter.DateTimeDateFormatter"/> and respectively + /// <see cref="log4net.DateFormatter.Iso8601DateFormatter"/>. For example, /// <b>%date{ISO8601}</b> or <b>%date{ABSOLUTE}</b>. /// </para> /// <para> @@ -338,7 +338,7 @@ namespace log4net.Layout /// <term>message</term> /// <description> /// <para> - /// Used to output the application supplied message associated with + /// Used to output the application supplied message associated with /// the logging event. /// </para> /// </description> @@ -382,10 +382,10 @@ namespace log4net.Layout /// characters. /// </para> /// <para> - /// This conversion pattern offers the same performance as using - /// non-portable line separator strings such as "\n", or "\r\n". + /// This conversion pattern offers the same performance as using + /// non-portable line separator strings such as "\n", or "\r\n". /// Thus, it is the preferred way of specifying a line separator. - /// </para> + /// </para> /// </description> /// </item> /// <item> @@ -413,13 +413,13 @@ namespace log4net.Layout /// <term>property</term> /// <description> /// <para> - /// Used to output the an event specific property. The key to + /// Used to output the an event specific property. The key to /// lookup must be specified within braces and directly following the /// pattern specifier, e.g. <b>%property{user}</b> would include the value /// from the property that is keyed by the string 'user'. Each property value /// that is to be included in the log must be specified separately. - /// Properties are added to events by loggers or appenders. By default - /// the <c>log4net:HostName</c> property is set to the name of machine on + /// Properties are added to events by loggers or appenders. By default + /// the <c>log4net:HostName</c> property is set to the name of machine on /// which the event was originally logged. /// </para> /// <para> @@ -434,7 +434,7 @@ namespace log4net.Layout /// <item> /// <term>the event properties</term> /// <description> - /// The event has <see cref="LoggingEvent.Properties"/> that can be set. These + /// The event has <see cref="LoggingEvent.Properties"/> that can be set. These /// properties are specific to this event only. /// </description> /// </item> @@ -448,12 +448,12 @@ namespace log4net.Layout /// <item> /// <term>the global properties</term> /// <description> - /// The <see cref="GlobalContext.Properties"/> that are set globally. These + /// The <see cref="GlobalContext.Properties"/> that are set globally. These /// properties are shared by all the threads in the AppDomain. /// </description> /// </item> /// </list> - /// + /// /// </description> /// </item> /// <item> @@ -461,13 +461,13 @@ namespace log4net.Layout /// <description>Equivalent to <b>timestamp</b></description> /// </item> /// <item> - /// <term>stacktrace</term> + /// <term>stacktrace</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>%stacktrace{level}</b>. - /// If no stack trace level specifier is given then 1 is assumed + /// The stack trace level specifier may be enclosed + /// 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: @@ -479,13 +479,13 @@ namespace log4net.Layout /// </description> /// </item> /// <item> - /// <term>stacktracedetail</term> + /// <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 + /// 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: @@ -519,7 +519,7 @@ namespace log4net.Layout /// </description> /// </item> /// <item> - /// <term>type</term> + /// <term>type</term> /// <description> /// <para> /// Used to output the fully qualified type name of the caller @@ -565,14 +565,14 @@ namespace log4net.Layout /// </description> /// </item> /// <item> - /// <term>utcdate</term> + /// <term>utcdate</term> /// <description> /// <para> - /// Used to output the date of the logging event in universal time. - /// The date conversion - /// specifier may be followed by a <i>date format specifier</i> enclosed + /// Used to output the date of the logging event in universal time. + /// The date conversion + /// specifier may be followed by a <i>date format specifier</i> enclosed /// between braces. For example, <b>%utcdate{HH:mm:ss,fff}</b> or - /// <b>%utcdate{dd MMM yyyy HH:mm:ss,fff}</b>. If no date format specifier is + /// <b>%utcdate{dd MMM yyyy HH:mm:ss,fff}</b>. If no date format specifier is /// given then ISO8601 format is /// assumed (<see cref="log4net.DateFormatter.Iso8601DateFormatter"/>). /// </para> @@ -583,10 +583,10 @@ namespace log4net.Layout /// <para> /// For better results it is recommended to use the log4net date /// formatters. These can be specified using one of the strings - /// "ABSOLUTE", "DATE" and "ISO8601" for specifying - /// <see cref="log4net.DateFormatter.AbsoluteTimeDateFormatter"/>, - /// <see cref="log4net.DateFormatter.DateTimeDateFormatter"/> and respectively - /// <see cref="log4net.DateFormatter.Iso8601DateFormatter"/>. For example, + /// "ABSOLUTE", "DATE" and "ISO8601" for specifying + /// <see cref="log4net.DateFormatter.AbsoluteTimeDateFormatter"/>, + /// <see cref="log4net.DateFormatter.DateTimeDateFormatter"/> and respectively + /// <see cref="log4net.DateFormatter.Iso8601DateFormatter"/>. For example, /// <b>%utcdate{ISO8601}</b> or <b>%utcdate{ABSOLUTE}</b>. /// </para> /// <para> @@ -617,7 +617,7 @@ namespace log4net.Layout /// </item> /// </list> /// <para> - /// The single letter patterns are deprecated in favor of the + /// The single letter patterns are deprecated in favor of the /// longer more descriptive pattern names. /// </para> /// <para> @@ -685,7 +685,7 @@ namespace log4net.Layout /// <td align="center">none</td> /// <td> /// <para> - /// Right pad with spaces if the logger + /// Right pad with spaces if the logger /// name is less than 20 characters long. /// </para> /// </td> @@ -697,7 +697,7 @@ namespace log4net.Layout /// <td align="center">30</td> /// <td> /// <para> - /// Truncate from the beginning if the logger + /// Truncate from the beginning if the logger /// name is longer than 30 characters. /// </para> /// </td> @@ -732,14 +732,14 @@ namespace log4net.Layout /// </div> /// <para> /// <b>Note about caller location information.</b><br /> - /// The following patterns <c>%type %file %line %method %location %class %C %F %L %l %M</c> + /// The following patterns <c>%type %file %line %method %location %class %C %F %L %l %M</c> /// all generate caller location information. /// Location information uses the <c>System.Diagnostics.StackTrace</c> class to generate /// a call stack. The caller's information is then extracted from this stack. /// </para> /// <note type="caution"> /// <para> - /// The <c>System.Diagnostics.StackTrace</c> class is not supported on the + /// The <c>System.Diagnostics.StackTrace</c> class is not supported on the /// .NET Compact Framework 1.0 therefore caller location information is not /// available on that framework. /// </para> @@ -749,15 +749,15 @@ namespace log4net.Layout /// The <c>System.Diagnostics.StackTrace</c> class has this to say about Release builds: /// </para> /// <para> - /// "StackTrace information will be most informative with Debug build configurations. - /// By default, Debug builds include debug symbols, while Release builds do not. The - /// debug symbols contain most of the file, method name, line number, and column - /// information used in constructing StackFrame and StackTrace objects. StackTrace - /// might not report as many method calls as expected, due to code transformations + /// "StackTrace information will be most informative with Debug build configurations. + /// By default, Debug builds include debug symbols, while Release builds do not. The + /// debug symbols contain most of the file, method name, line number, and column + /// information used in constructing StackFrame and StackTrace objects. StackTrace + /// might not report as many method calls as expected, due to code transformations /// that occur during optimization." /// </para> /// <para> - /// This means that in a Release build the caller information may be incomplete or may + /// This means that in a Release build the caller information may be incomplete or may /// not exist at all! Therefore caller location information cannot be relied upon in a Release build. /// </para> /// </note> @@ -787,13 +787,13 @@ namespace log4net.Layout #region Constants /// <summary> - /// Default pattern string for log output. + /// Default pattern string for log output. /// </summary> /// <remarks> /// <para> - /// Default pattern string for log output. - /// Currently set to the string <b>"%message%newline"</b> - /// which just prints the application supplied message. + /// Default pattern string for log output. + /// Currently set to the string <b>"%message%newline"</b> + /// which just prints the application supplied message. /// </para> /// </remarks> public const string DefaultConversionPattern ="%message%newline"; @@ -826,12 +826,12 @@ namespace log4net.Layout #endregion Static Fields #region Member Variables - + /// <summary> /// the pattern /// </summary> private string m_pattern; - + /// <summary> /// the head of the pattern converter chain /// </summary> @@ -907,7 +907,7 @@ namespace log4net.Layout s_globalRulesRegistry.Add("r", typeof(RelativeTimePatternConverter)); s_globalRulesRegistry.Add("timestamp", typeof(RelativeTimePatternConverter)); - + #if !(NETCF || NETSTANDARD1_3) s_globalRulesRegistry.Add("stacktrace", typeof(StackTracePatternConverter)); s_globalRulesRegistry.Add("stacktracedetail", typeof(StackTraceDetailPatternConverter)); @@ -975,11 +975,11 @@ namespace log4net.Layout /// aware that it will be called before your is called constructor. /// </para> /// <para> - /// When using this constructor the <see cref="ActivateOptions"/> method + /// When using this constructor the <see cref="ActivateOptions"/> method /// need not be called. This may not be the case when using a subclass. /// </para> /// </remarks> - public PatternLayout(string pattern) + public PatternLayout(string pattern) { // By default we do not process the exception IgnoresException = true; @@ -994,7 +994,7 @@ namespace log4net.Layout } #endregion - + /// <summary> /// The pattern formatting string /// </summary> @@ -1022,7 +1022,7 @@ namespace log4net.Layout /// global and instance rules on the <see cref="PatternParser"/>. /// </para> /// </remarks> - virtual protected PatternParser CreatePatternParser(string pattern) + virtual protected PatternParser CreatePatternParser(string pattern) { PatternParser patternParser = new PatternParser(pattern); @@ -1042,7 +1042,7 @@ namespace log4net.Layout return patternParser; } - + #region Implementation of IOptionHandler /// <summary> @@ -1051,17 +1051,17 @@ namespace log4net.Layout /// <remarks> /// <para> /// This is part of the <see cref="IOptionHandler"/> delayed object - /// activation scheme. The <see cref="ActivateOptions"/> method must + /// activation scheme. The <see cref="ActivateOptions"/> method must /// be called on this object after the configuration properties have /// been set. Until <see cref="ActivateOptions"/> is called this - /// object is in an undefined state and must not be used. + /// object is in an undefined state and must not be used. /// </para> /// <para> - /// If any of the configuration properties are modified then + /// If any of the configuration properties are modified then /// <see cref="ActivateOptions"/> must be called again. /// </para> /// </remarks> - override public void ActivateOptions() + override public void ActivateOptions() { m_head = CreatePatternParser(m_pattern).Parse(); @@ -1098,7 +1098,7 @@ namespace log4net.Layout /// specified in the <see cref="ConversionPattern"/> property. /// </para> /// </remarks> - override public void Format(TextWriter writer, LoggingEvent loggingEvent) + override public void Format(TextWriter writer, LoggingEvent loggingEvent) { if (writer == null) { @@ -1112,7 +1112,7 @@ namespace log4net.Layout PatternConverter c = m_head; // loop through the chain of pattern converters - while(c != null) + while(c != null) { c.Format(writer, loggingEvent); c = c.Next; @@ -1154,7 +1154,7 @@ namespace log4net.Layout /// This method must be called before <see cref="ActivateOptions"/>. /// </para> /// <para> - /// The <paramref name="type"/> specified must extend the + /// The <paramref name="type"/> specified must extend the /// <see cref="PatternConverter"/> type. /// </para> /// </remarks>
http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/8a5b4204/src/Layout/RawLayoutConverter.cs ---------------------------------------------------------------------- diff --git a/src/Layout/RawLayoutConverter.cs b/src/Layout/RawLayoutConverter.cs index 7ccfe77..18132f3 100644 --- a/src/Layout/RawLayoutConverter.cs +++ b/src/Layout/RawLayoutConverter.cs @@ -1,10 +1,10 @@ #region Apache License // -// Licensed to the Apache Software Foundation (ASF) under one or more +// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright ownership. +// this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, Version 2.0 -// (the "License"); you may not use this file except in compliance with +// (the "License"); you may not use this file except in compliance with // the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 @@ -56,7 +56,7 @@ namespace log4net.Layout /// as the <paramref name="sourceType"/>. /// </para> /// </remarks> - public bool CanConvertFrom(Type sourceType) + public bool CanConvertFrom(Type sourceType) { // Accept an ILayout object return (typeof(ILayout).IsAssignableFrom(sourceType)); @@ -69,17 +69,17 @@ namespace log4net.Layout /// <returns>the <see cref="IRawLayout"/> object</returns> /// <remarks> /// <para> - /// Convert the <paramref name="source"/> object to a + /// Convert the <paramref name="source"/> object to a /// <see cref="IRawLayout"/> object. If the <paramref name="source"/> object /// is a <see cref="ILayout"/> then the <see cref="Layout2RawLayoutAdapter"/> /// is used to adapt between the two interfaces, otherwise an /// exception is thrown. /// </para> /// </remarks> - public object ConvertFrom(object source) + public object ConvertFrom(object source) { ILayout layout = source as ILayout; - if (layout != null) + if (layout != null) { return new Layout2RawLayoutAdapter(layout); } http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/8a5b4204/src/Layout/RawPropertyLayout.cs ---------------------------------------------------------------------- diff --git a/src/Layout/RawPropertyLayout.cs b/src/Layout/RawPropertyLayout.cs index f50dda2..09819f2 100644 --- a/src/Layout/RawPropertyLayout.cs +++ b/src/Layout/RawPropertyLayout.cs @@ -1,10 +1,10 @@ #region Apache License // -// Licensed to the Apache Software Foundation (ASF) under one or more +// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright ownership. +// this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, Version 2.0 -// (the "License"); you may not use this file except in compliance with +// (the "License"); you may not use this file except in compliance with // the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 @@ -65,7 +65,7 @@ namespace log4net.Layout get { return m_key; } set { m_key = value; } } - + #region Implementation of IRawLayout /// <summary> http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/8a5b4204/src/Layout/RawTimeStampLayout.cs ---------------------------------------------------------------------- diff --git a/src/Layout/RawTimeStampLayout.cs b/src/Layout/RawTimeStampLayout.cs index 66a4dec..8109f11 100644 --- a/src/Layout/RawTimeStampLayout.cs +++ b/src/Layout/RawTimeStampLayout.cs @@ -1,10 +1,10 @@ #region Apache License // -// Licensed to the Apache Software Foundation (ASF) under one or more +// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright ownership. +// this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, Version 2.0 -// (the "License"); you may not use this file except in compliance with +// (the "License"); you may not use this file except in compliance with // the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 @@ -47,7 +47,7 @@ namespace log4net.Layout } #endregion - + #region Implementation of IRawLayout /// <summary> http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/8a5b4204/src/Layout/RawUtcTimeStampLayout.cs ---------------------------------------------------------------------- diff --git a/src/Layout/RawUtcTimeStampLayout.cs b/src/Layout/RawUtcTimeStampLayout.cs index 2c232ae..d502618 100644 --- a/src/Layout/RawUtcTimeStampLayout.cs +++ b/src/Layout/RawUtcTimeStampLayout.cs @@ -1,10 +1,10 @@ #region Apache License // -// Licensed to the Apache Software Foundation (ASF) under one or more +// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright ownership. +// this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, Version 2.0 -// (the "License"); you may not use this file except in compliance with +// (the "License"); you may not use this file except in compliance with // the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 @@ -47,7 +47,7 @@ namespace log4net.Layout } #endregion - + #region Implementation of IRawLayout /// <summary> http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/8a5b4204/src/Layout/SimpleLayout.cs ---------------------------------------------------------------------- diff --git a/src/Layout/SimpleLayout.cs b/src/Layout/SimpleLayout.cs index b330ee7..a8f97db 100644 --- a/src/Layout/SimpleLayout.cs +++ b/src/Layout/SimpleLayout.cs @@ -1,10 +1,10 @@ #region Apache License // -// Licensed to the Apache Software Foundation (ASF) under one or more +// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright ownership. +// this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, Version 2.0 -// (the "License"); you may not use this file except in compliance with +// (the "License"); you may not use this file except in compliance with // the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 @@ -53,7 +53,7 @@ namespace log4net.Layout } #endregion - + #region Implementation of IOptionHandler /// <summary> @@ -62,17 +62,17 @@ namespace log4net.Layout /// <remarks> /// <para> /// This is part of the <see cref="IOptionHandler"/> delayed object - /// activation scheme. The <see cref="ActivateOptions"/> method must + /// activation scheme. The <see cref="ActivateOptions"/> method must /// be called on this object after the configuration properties have /// been set. Until <see cref="ActivateOptions"/> is called this - /// object is in an undefined state and must not be used. + /// object is in an undefined state and must not be used. /// </para> /// <para> - /// If any of the configuration properties are modified then + /// If any of the configuration properties are modified then /// <see cref="ActivateOptions"/> must be called again. /// </para> /// </remarks> - override public void ActivateOptions() + override public void ActivateOptions() { // nothing to do. } @@ -93,7 +93,7 @@ namespace log4net.Layout /// output is terminated by a newline. /// </para> /// </remarks> - override public void Format(TextWriter writer, LoggingEvent loggingEvent) + override public void Format(TextWriter writer, LoggingEvent loggingEvent) { if (loggingEvent == null) { http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/8a5b4204/src/Layout/XmlLayout.cs ---------------------------------------------------------------------- diff --git a/src/Layout/XmlLayout.cs b/src/Layout/XmlLayout.cs index 34f9750..a0f05d4 100644 --- a/src/Layout/XmlLayout.cs +++ b/src/Layout/XmlLayout.cs @@ -1,10 +1,10 @@ #region Apache License // -// Licensed to the Apache Software Foundation (ASF) under one or more +// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright ownership. +// this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, Version 2.0 -// (the "License"); you may not use this file except in compliance with +// (the "License"); you may not use this file except in compliance with // the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 @@ -31,19 +31,19 @@ namespace log4net.Layout /// </summary> /// <remarks> /// <para> - /// The output of the <see cref="XmlLayout" /> consists of a series of - /// log4net:event elements. It does not output a complete well-formed XML + /// The output of the <see cref="XmlLayout" /> consists of a series of + /// log4net:event elements. It does not output a complete well-formed XML /// file. The output is designed to be included as an <em>external entity</em> /// in a separate file to form a correct XML file. /// </para> /// <para> /// For example, if <c>abc</c> is the name of the file where - /// the <see cref="XmlLayout" /> output goes, then a well-formed XML file would + /// the <see cref="XmlLayout" /> output goes, then a well-formed XML file would /// be: /// </para> /// <code lang="XML"> /// <?xml version="1.0" ?> - /// + /// /// <!DOCTYPE log4net:events SYSTEM "log4net-events.dtd" [<!ENTITY data SYSTEM "abc">]> /// /// <log4net:events version="1.2" xmlns:log4net="http://logging.apache.org/log4net/schemas/log4net-events-1.2> @@ -51,12 +51,12 @@ namespace log4net.Layout /// </log4net:events> /// </code> /// <para> - /// This approach enforces the independence of the <see cref="XmlLayout" /> + /// This approach enforces the independence of the <see cref="XmlLayout" /> /// and the appender where it is embedded. /// </para> /// <para> /// The <c>version</c> attribute helps components to correctly - /// interpret output generated by <see cref="XmlLayout" />. The value of + /// interpret output generated by <see cref="XmlLayout" />. The value of /// this attribute should be "1.2" for release 1.2 and later. /// </para> /// <para> @@ -89,11 +89,11 @@ namespace log4net.Layout /// default, it is set to false which means there will be no location /// information output by this layout. If the the option is set to /// true, then the file name and line number of the statement - /// at the origin of the log statement will be output. + /// at the origin of the log statement will be output. /// </para> /// <para> /// If you are embedding this layout within an SmtpAppender - /// then make sure to set the <b>LocationInfo</b> option of that + /// then make sure to set the <b>LocationInfo</b> option of that /// appender as well. /// </para> /// </remarks> @@ -121,7 +121,7 @@ namespace log4net.Layout set { m_prefix = value; } } - + /// <summary> /// Set whether or not to base64 encode the message. /// </summary> @@ -171,20 +171,20 @@ namespace log4net.Layout /// <remarks> /// <para> /// This is part of the <see cref="IOptionHandler"/> delayed object - /// activation scheme. The <see cref="ActivateOptions"/> method must + /// activation scheme. The <see cref="ActivateOptions"/> method must /// be called on this object after the configuration properties have /// been set. Until <see cref="ActivateOptions"/> is called this - /// object is in an undefined state and must not be used. + /// object is in an undefined state and must not be used. /// </para> /// <para> - /// If any of the configuration properties are modified then + /// If any of the configuration properties are modified then /// <see cref="ActivateOptions"/> must be called again. /// </para> /// <para> /// Builds a cache of the element names /// </para> /// </remarks> - override public void ActivateOptions() + override public void ActivateOptions() { base.ActivateOptions(); @@ -241,7 +241,7 @@ namespace log4net.Layout { writer.WriteAttributeString(ATTR_USERNAME, loggingEvent.UserName); } - + // Append the message text writer.WriteStartElement(m_elmMessage); if (!this.Base64EncodeMessage) @@ -295,7 +295,7 @@ namespace log4net.Layout } if (LocationInfo) - { + { LocationInfo locationInfo = loggingEvent.LocationInformation; writer.WriteStartElement(m_elmLocation); @@ -312,7 +312,7 @@ namespace log4net.Layout #endregion Override implementation of XMLLayoutBase #region Private Instance Fields - + /// <summary> /// The prefix to use for all generated element names /// </summary> http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/8a5b4204/src/Layout/XmlLayoutBase.cs ---------------------------------------------------------------------- diff --git a/src/Layout/XmlLayoutBase.cs b/src/Layout/XmlLayoutBase.cs index 9b51653..8159c11 100644 --- a/src/Layout/XmlLayoutBase.cs +++ b/src/Layout/XmlLayoutBase.cs @@ -1,10 +1,10 @@ #region Apache License // -// Licensed to the Apache Software Foundation (ASF) under one or more +// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright ownership. +// this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, Version 2.0 -// (the "License"); you may not use this file except in compliance with +// (the "License"); you may not use this file except in compliance with // the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 @@ -32,7 +32,7 @@ namespace log4net.Layout /// </summary> /// <remarks> /// <para> - /// This is an abstract class that must be subclassed by an implementation + /// This is an abstract class that must be subclassed by an implementation /// to conform to a specific schema. /// </para> /// <para> @@ -64,15 +64,15 @@ namespace log4net.Layout /// </summary> /// <remarks> /// <para> - /// The <paramref name="locationInfo" /> parameter determines whether - /// location information will be output by the layout. If - /// <paramref name="locationInfo" /> is set to <c>true</c>, then the - /// file name and line number of the statement at the origin of the log - /// statement will be output. + /// The <paramref name="locationInfo" /> parameter determines whether + /// location information will be output by the layout. If + /// <paramref name="locationInfo" /> is set to <c>true</c>, then the + /// file name and line number of the statement at the origin of the log + /// statement will be output. /// </para> /// <para> /// If you are embedding this layout within an SMTPAppender - /// then make sure to set the <b>LocationInfo</b> option of that + /// then make sure to set the <b>LocationInfo</b> option of that /// appender as well. /// </para> /// </remarks> @@ -87,22 +87,22 @@ namespace log4net.Layout #region Public Instance Properties /// <summary> - /// Gets a value indicating whether to include location information in + /// Gets a value indicating whether to include location information in /// the XML events. /// </summary> /// <value> - /// <c>true</c> if location information should be included in the XML + /// <c>true</c> if location information should be included in the XML /// events; otherwise, <c>false</c>. /// </value> /// <remarks> /// <para> - /// If <see cref="LocationInfo" /> is set to <c>true</c>, then the file - /// name and line number of the statement at the origin of the log - /// statement will be output. + /// If <see cref="LocationInfo" /> is set to <c>true</c>, then the file + /// name and line number of the statement at the origin of the log + /// statement will be output. /// </para> /// <para> /// If you are embedding this layout within an <c>SMTPAppender</c> - /// then make sure to set the <b>LocationInfo</b> option of that + /// then make sure to set the <b>LocationInfo</b> option of that /// appender as well. /// </para> /// </remarks> @@ -119,7 +119,7 @@ namespace log4net.Layout /// string to replace those that can not with. This defaults to a ?. Set it /// to the empty string to simply remove offending characters. For more /// details on the allowed character ranges see http://www.w3.org/TR/REC-xml/#charsets - /// Character replacement will occur in the log message, the property names + /// Character replacement will occur in the log message, the property names /// and the property values. /// </para> /// </remarks> @@ -139,17 +139,17 @@ namespace log4net.Layout /// <remarks> /// <para> /// This is part of the <see cref="IOptionHandler"/> delayed object - /// activation scheme. The <see cref="ActivateOptions"/> method must + /// activation scheme. The <see cref="ActivateOptions"/> method must /// be called on this object after the configuration properties have /// been set. Until <see cref="ActivateOptions"/> is called this - /// object is in an undefined state and must not be used. + /// object is in an undefined state and must not be used. /// </para> /// <para> - /// If any of the configuration properties are modified then + /// If any of the configuration properties are modified then /// <see cref="ActivateOptions"/> must be called again. /// </para> /// </remarks> - override public void ActivateOptions() + override public void ActivateOptions() { // nothing to do } @@ -159,7 +159,7 @@ namespace log4net.Layout #region Override implementation of LayoutSkeleton /// <summary> - /// Gets the content type output by this layout. + /// Gets the content type output by this layout. /// </summary> /// <value> /// As this is the XML layout, the value is always <c>"text/xml"</c>. @@ -185,12 +185,12 @@ namespace log4net.Layout /// </para> /// <para> /// This method creates an <see cref="XmlTextWriter"/> that writes to the - /// <paramref name="writer"/>. The <see cref="XmlTextWriter"/> is passed + /// <paramref name="writer"/>. The <see cref="XmlTextWriter"/> is passed /// to the <see cref="FormatXml"/> method. Subclasses should override the /// <see cref="FormatXml"/> method rather than this method. /// </para> /// </remarks> - override public void Format(TextWriter writer, LoggingEvent loggingEvent) + override public void Format(TextWriter writer, LoggingEvent loggingEvent) { if (loggingEvent == null) { @@ -238,7 +238,7 @@ namespace log4net.Layout #endregion Protected Instance Methods #region Private Instance Fields - + /// <summary> /// Flag to indicate if location information should be included in /// the XML events. http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/8a5b4204/src/Layout/XmlLayoutSchemaLog4j.cs ---------------------------------------------------------------------- diff --git a/src/Layout/XmlLayoutSchemaLog4j.cs b/src/Layout/XmlLayoutSchemaLog4j.cs index b479102..f42bbf8 100644 --- a/src/Layout/XmlLayoutSchemaLog4j.cs +++ b/src/Layout/XmlLayoutSchemaLog4j.cs @@ -1,10 +1,10 @@ #region Apache License // -// Licensed to the Apache Software Foundation (ASF) under one or more +// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright ownership. +// this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, Version 2.0 -// (the "License"); you may not use this file except in compliance with +// (the "License"); you may not use this file except in compliance with // the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 @@ -65,11 +65,11 @@ namespace log4net.Layout /// default, it is set to false which means there will be no location /// information output by this layout. If the the option is set to /// true, then the file name and line number of the statement - /// at the origin of the log statement will be output. + /// at the origin of the log statement will be output. /// </para> /// <para> /// If you are embedding this layout within an SMTPAppender - /// then make sure to set the <b>LocationInfo</b> option of that + /// then make sure to set the <b>LocationInfo</b> option of that /// appender as well. /// </para> /// </remarks> @@ -92,8 +92,8 @@ namespace log4net.Layout public string Version { get { return "1.2"; } - set - { + set + { if (value != "1.2") { throw new ArgumentException("Only version 1.2 of the log4j schema is currently supported"); @@ -141,31 +141,31 @@ method="run" file="Generator.java" line="94"/> // Translate logging events for log4j // Translate hostname property - if (loggingEvent.LookupProperty(LoggingEvent.HostNameProperty) != null && + if (loggingEvent.LookupProperty(LoggingEvent.HostNameProperty) != null && loggingEvent.LookupProperty("log4jmachinename") == null) { loggingEvent.GetProperties()["log4jmachinename"] = loggingEvent.LookupProperty(LoggingEvent.HostNameProperty); } // translate appdomain name - if (loggingEvent.LookupProperty("log4japp") == null && - loggingEvent.Domain != null && + if (loggingEvent.LookupProperty("log4japp") == null && + loggingEvent.Domain != null && loggingEvent.Domain.Length > 0) { loggingEvent.GetProperties()["log4japp"] = loggingEvent.Domain; } // translate identity name - if (loggingEvent.Identity != null && - loggingEvent.Identity.Length > 0 && + if (loggingEvent.Identity != null && + loggingEvent.Identity.Length > 0 && loggingEvent.LookupProperty(LoggingEvent.IdentityProperty) == null) { loggingEvent.GetProperties()[LoggingEvent.IdentityProperty] = loggingEvent.Identity; } // translate user name - if (loggingEvent.UserName != null && - loggingEvent.UserName.Length > 0 && + if (loggingEvent.UserName != null && + loggingEvent.UserName.Length > 0 && loggingEvent.LookupProperty(LoggingEvent.UserNameProperty) == null) { loggingEvent.GetProperties()[LoggingEvent.UserNameProperty] = loggingEvent.UserName; @@ -176,7 +176,7 @@ method="run" file="Generator.java" line="94"/> writer.WriteAttributeString("logger", loggingEvent.LoggerName); // Calculate the timestamp as the number of milliseconds since january 1970 - // + // // We must convert the TimeStamp to UTC before performing any mathematical // operations. This allows use to take into account discontinuities // caused by daylight savings time transitions. @@ -185,7 +185,7 @@ method="run" file="Generator.java" line="94"/> writer.WriteAttributeString("timestamp", XmlConvert.ToString((long)timeSince1970.TotalMilliseconds)); writer.WriteAttributeString("level", loggingEvent.Level.DisplayName); writer.WriteAttributeString("thread", loggingEvent.ThreadName); - + // Append the message text writer.WriteStartElement("log4j:message"); Transform.WriteEscapedXmlString(writer, loggingEvent.RenderedMessage,this.InvalidCharReplacement); @@ -234,7 +234,7 @@ method="run" file="Generator.java" line="94"/> } if (LocationInfo) - { + { LocationInfo locationInfo = loggingEvent.LocationInformation; writer.WriteStartElement("log4j:locationInfo"); http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/8a5b4204/src/Log4netAssemblyInfo.cs ---------------------------------------------------------------------- diff --git a/src/Log4netAssemblyInfo.cs b/src/Log4netAssemblyInfo.cs index 78f1a01..ec143b7 100644 --- a/src/Log4netAssemblyInfo.cs +++ b/src/Log4netAssemblyInfo.cs @@ -1,10 +1,10 @@ #region Apache License // -// Licensed to the Apache Software Foundation (ASF) under one or more +// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright ownership. +// this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, Version 2.0 -// (the "License"); you may not use this file except in compliance with +// (the "License"); you may not use this file except in compliance with // the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/8a5b4204/src/LogManager.cs ---------------------------------------------------------------------- diff --git a/src/LogManager.cs b/src/LogManager.cs index 59f6b53..939a026 100644 --- a/src/LogManager.cs +++ b/src/LogManager.cs @@ -1,10 +1,10 @@ #region Apache License // -// Licensed to the Apache Software Foundation (ASF) under one or more +// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright ownership. +// this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, Version 2.0 -// (the "License"); you may not use this file except in compliance with +// (the "License"); you may not use this file except in compliance with // the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 @@ -31,7 +31,7 @@ namespace log4net /// <remarks> /// <para> /// This class has static methods that are used by a client to request - /// a logger instance. The <see cref="M:GetLogger(string)"/> method is + /// a logger instance. The <see cref="M:GetLogger(string)"/> method is /// used to retrieve a logger. /// </para> /// <para> @@ -41,10 +41,10 @@ namespace log4net /// <example>Simple example of logging messages /// <code lang="C#"> /// ILog log = LogManager.GetLogger("application-log"); - /// + /// /// log.Info("Application Start"); /// log.Debug("This is a debug message"); - /// + /// /// if (log.IsDebugEnabled) /// { /// log.Debug("This is another debug message"); @@ -60,7 +60,7 @@ namespace log4net #region Private Instance Constructors /// <summary> - /// Initializes a new instance of the <see cref="LogManager" /> class. + /// Initializes a new instance of the <see cref="LogManager" /> class. /// </summary> /// <remarks> /// Uses a private access modifier to prevent instantiation of this class. @@ -86,11 +86,11 @@ namespace log4net /// </remarks> /// <param name="name">The fully qualified logger name to look for.</param> /// <returns>The logger found, or <c>null</c> if no logger could be found.</returns> - public static ILog Exists(string name) + public static ILog Exists(string name) { return Exists(Assembly.GetCallingAssembly(), name); } - + /// <overloads>Get the currently defined loggers.</overloads> /// <summary> /// Returns all the currently defined loggers in the default repository. @@ -103,7 +103,7 @@ namespace log4net { return GetCurrentLoggers(Assembly.GetCallingAssembly()); } - + /// <overloads>Get or create a logger.</overloads> /// <summary> /// Retrieves or creates a named logger. @@ -141,10 +141,10 @@ namespace log4net /// <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 + /// 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) + public static ILog Exists(string repository, string name) { return WrapLogger(LoggerManager.Exists(repository, name)); } @@ -165,7 +165,7 @@ namespace log4net /// The logger, or <c>null</c> if the logger doesn't exist in the specified /// assembly's repository. /// </returns> - public static ILog Exists(Assembly repositoryAssembly, string name) + public static ILog Exists(Assembly repositoryAssembly, string name) { return WrapLogger(LoggerManager.Exists(repositoryAssembly, name)); } @@ -242,7 +242,7 @@ namespace log4net public static ILog GetLogger(Assembly repositoryAssembly, string name) { return WrapLogger(LoggerManager.GetLogger(repositoryAssembly, name)); - } + } /// <summary> /// Shorthand for <see cref="M:LogManager.GetLogger(string)"/>. @@ -252,7 +252,7 @@ namespace log4net /// </remarks> /// <param name="type">The full name of <paramref name="type"/> will be used as the name of the logger to retrieve.</param> /// <returns>The logger with the name specified.</returns> - public static ILog GetLogger(Type type) + public static ILog GetLogger(Type type) { #if NETSTANDARD1_3 return GetLogger(type.GetTypeInfo().Assembly, type.FullName); @@ -270,7 +270,7 @@ namespace log4net /// <param name="repository">The repository to lookup in.</param> /// <param name="type">The full name of <paramref name="type"/> will be used as the name of the logger to retrieve.</param> /// <returns>The logger with the name specified.</returns> - public static ILog GetLogger(string repository, Type type) + public static ILog GetLogger(string repository, Type type) { return WrapLogger(LoggerManager.GetLogger(repository, type)); } @@ -284,7 +284,7 @@ namespace log4net /// <param name="repositoryAssembly">The assembly to use to lookup the repository.</param> /// <param name="type">The full name of <paramref name="type"/> will be used as the name of the logger to retrieve.</param> /// <returns>The logger with the name specified.</returns> - public static ILog GetLogger(Assembly repositoryAssembly, Type type) + public static ILog GetLogger(Assembly repositoryAssembly, Type type) { return WrapLogger(LoggerManager.GetLogger(repositoryAssembly, type)); } @@ -303,7 +303,7 @@ namespace log4net /// default repositories. /// </para> /// <para> - /// Some appenders need to be closed before the application exists. + /// Some appenders need to be closed before the application exists. /// Otherwise, pending logging events might be lost. /// </para> /// <para>The <c>shutdown</c> method is careful to close nested @@ -312,7 +312,7 @@ namespace log4net /// and again to a nested appender. /// </para> /// </remarks> - public static void Shutdown() + public static void Shutdown() { LoggerManager.Shutdown(); } @@ -328,7 +328,7 @@ namespace log4net /// appenders in all the loggers including root contained in the /// default repository. /// </para> - /// <para>Some appenders need to be closed before the application exists. + /// <para>Some appenders need to be closed before the application exists. /// Otherwise, pending logging events might be lost. /// </para> /// <para>The <c>shutdown</c> method is careful to close nested @@ -337,7 +337,7 @@ namespace log4net /// and again to a nested appender. /// </para> /// </remarks> - public static void ShutdownRepository() + public static void ShutdownRepository() { ShutdownRepository(Assembly.GetCallingAssembly()); } @@ -353,7 +353,7 @@ namespace log4net /// <paramref name="repository"/> specified. /// </para> /// <para> - /// Some appenders need to be closed before the application exists. + /// Some appenders need to be closed before the application exists. /// Otherwise, pending logging events might be lost. /// </para> /// <para>The <c>shutdown</c> method is careful to close nested @@ -363,7 +363,7 @@ namespace log4net /// </para> /// </remarks> /// <param name="repository">The repository to shutdown.</param> - public static void ShutdownRepository(string repository) + public static void ShutdownRepository(string repository) { LoggerManager.ShutdownRepository(repository); } @@ -379,7 +379,7 @@ namespace log4net /// the <paramref name="repositoryAssembly"/> specified. /// </para> /// <para> - /// Some appenders need to be closed before the application exists. + /// Some appenders need to be closed before the application exists. /// Otherwise, pending logging events might be lost. /// </para> /// <para> @@ -390,7 +390,7 @@ namespace log4net /// </para> /// </remarks> /// <param name="repositoryAssembly">The assembly to use to lookup the repository.</param> - public static void ShutdownRepository(Assembly repositoryAssembly) + public static void ShutdownRepository(Assembly repositoryAssembly) { LoggerManager.ShutdownRepository(repositoryAssembly); } @@ -408,9 +408,9 @@ namespace log4net /// sets their additivity flag to <c>true</c> and sets the level /// of the root logger to <see cref="Level.Debug"/>. Moreover, /// message disabling is set to its default "off" value. - /// </para> + /// </para> /// </remarks> - public static void ResetConfiguration() + public static void ResetConfiguration() { ResetConfiguration(Assembly.GetCallingAssembly()); } @@ -427,10 +427,10 @@ namespace log4net /// sets their additivity flag to <c>true</c> and sets the level /// of the root logger to <see cref="Level.Debug"/>. Moreover, /// message disabling is set to its default "off" value. - /// </para> + /// </para> /// </remarks> /// <param name="repository">The repository to reset.</param> - public static void ResetConfiguration(string repository) + public static void ResetConfiguration(string repository) { LoggerManager.ResetConfiguration(repository); } @@ -446,10 +446,10 @@ namespace log4net /// sets their additivity flag to <c>true</c> and sets the level /// of the root logger to <see cref="Level.Debug"/>. Moreover, /// message disabling is set to its default "off" value. - /// </para> + /// </para> /// </remarks> /// <param name="repositoryAssembly">The assembly to use to lookup the repository to reset.</param> - public static void ResetConfiguration(Assembly repositoryAssembly) + public static void ResetConfiguration(Assembly repositoryAssembly) { LoggerManager.ResetConfiguration(repositoryAssembly); } @@ -568,7 +568,7 @@ namespace log4net /// </para> /// <para> /// The <see cref="ILoggerRepository"/> created will be associated with the repository - /// specified such that a call to <see cref="M:GetRepository()"/> will return + /// specified such that a call to <see cref="M:GetRepository()"/> will return /// the same repository instance. /// </para> /// </remarks> @@ -593,7 +593,7 @@ namespace log4net /// <remarks> /// <para> /// The <see cref="ILoggerRepository"/> created will be associated with the repository - /// specified such that a call to <see cref="M:GetRepository()"/> will return + /// specified such that a call to <see cref="M:GetRepository()"/> will return /// the same repository instance. /// </para> /// </remarks> http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/8a5b4204/src/LogicalThreadContext.cs ---------------------------------------------------------------------- diff --git a/src/LogicalThreadContext.cs b/src/LogicalThreadContext.cs index 0403c42..894a64f 100644 --- a/src/LogicalThreadContext.cs +++ b/src/LogicalThreadContext.cs @@ -1,10 +1,10 @@ #region Apache License // -// Licensed to the Apache Software Foundation (ASF) under one or more +// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright ownership. +// this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, Version 2.0 -// (the "License"); you may not use this file except in compliance with +// (the "License"); you may not use this file except in compliance with // the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 @@ -32,7 +32,7 @@ namespace log4net /// </summary> /// <remarks> /// <para> - /// The <c>LogicalThreadContext</c> provides a location for <see cref="System.Runtime.Remoting.Messaging.CallContext"/> specific debugging + /// The <c>LogicalThreadContext</c> provides a location for <see cref="System.Runtime.Remoting.Messaging.CallContext"/> specific debugging /// information to be stored. /// The <c>LogicalThreadContext</c> properties override any <see cref="ThreadContext"/> or <see cref="GlobalContext"/> /// properties with the same name. @@ -44,12 +44,12 @@ namespace log4net /// </para> /// <para> /// The Logical Thread Context has a properties map and a stack. - /// The properties and stack can + /// The properties and stack can /// be included in the output of log messages. The <see cref="log4net.Layout.PatternLayout"/> /// supports selecting and outputting these properties. /// </para> /// <para> - /// The Logical Thread Context provides a diagnostic context for the current call context. + /// The Logical Thread Context provides a diagnostic context for the current call context. /// This is an instrument for distinguishing interleaved log /// output from different sources. Log output is typically interleaved /// when a server handles multiple clients near-simultaneously. @@ -58,7 +58,7 @@ namespace log4net /// The Logical Thread Context is managed on a per <see cref="System.Runtime.Remoting.Messaging.CallContext"/> basis. /// </para> /// <para> - /// The <see cref="System.Runtime.Remoting.Messaging.CallContext"/> requires a link time + /// The <see cref="System.Runtime.Remoting.Messaging.CallContext"/> requires a link time /// <see cref="System.Security.Permissions.SecurityPermission"/> for the /// <see cref="System.Security.Permissions.SecurityPermissionFlag.Infrastructure"/>. /// If the calling code does not have this permission then this context will be disabled. @@ -76,8 +76,8 @@ namespace log4net /// using(LogicalThreadContext.Stacks["LDC"].Push("my context message")) /// { /// log.Info("This log message has a LogicalThreadContext Stack message that includes 'my context message'"); - /// - /// } // at the end of the using block the message is automatically popped + /// + /// } // at the end of the using block the message is automatically popped /// </code> /// </example> /// <threadsafety static="true" instance="true" /> @@ -87,7 +87,7 @@ namespace log4net #region Private Instance Constructors /// <summary> - /// Private Constructor. + /// Private Constructor. /// </summary> /// <remarks> /// <para> @@ -110,7 +110,7 @@ namespace log4net /// </value> /// <remarks> /// <para> - /// The <c>LogicalThreadContext</c> properties override any <see cref="ThreadContext"/> + /// The <c>LogicalThreadContext</c> properties override any <see cref="ThreadContext"/> /// or <see cref="GlobalContext"/> properties with the same name. /// </para> /// </remarks> http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/8a5b4204/src/MDC.cs ---------------------------------------------------------------------- diff --git a/src/MDC.cs b/src/MDC.cs index 06e1b1d..0b049e0 100644 --- a/src/MDC.cs +++ b/src/MDC.cs @@ -1,10 +1,10 @@ #region Apache License // -// Licensed to the Apache Software Foundation (ASF) under one or more +// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright ownership. +// this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, Version 2.0 -// (the "License"); you may not use this file except in compliance with +// (the "License"); you may not use this file except in compliance with // the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 @@ -53,7 +53,7 @@ namespace log4net #region Private Instance Constructors /// <summary> - /// Initializes a new instance of the <see cref="MDC" /> class. + /// Initializes a new instance of the <see cref="MDC" /> class. /// </summary> /// <remarks> /// Uses a private access modifier to prevent instantiation of this class. @@ -113,7 +113,7 @@ namespace log4net /// </para> /// <para> /// If a value is already defined for the <paramref name="key" /> - /// specified then the value will be replaced. If the <paramref name="value" /> + /// specified then the value will be replaced. If the <paramref name="value" /> /// is specified as <c>null</c> then the key value mapping will be removed. /// </para> /// </remarks> http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/8a5b4204/src/NDC.cs ---------------------------------------------------------------------- diff --git a/src/NDC.cs b/src/NDC.cs index 6b79619..7d0008b 100644 --- a/src/NDC.cs +++ b/src/NDC.cs @@ -1,10 +1,10 @@ #region Apache License // -// Licensed to the Apache Software Foundation (ASF) under one or more +// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright ownership. +// this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, Version 2.0 -// (the "License"); you may not use this file except in compliance with +// (the "License"); you may not use this file except in compliance with // the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 @@ -58,8 +58,8 @@ namespace log4net /// using(NDC.Push("my context message")) /// { /// ... all log calls will have 'my context message' included ... - /// - /// } // at the end of the using block the message is automatically removed + /// + /// } // at the end of the using block the message is automatically removed /// </code> /// </example> /// <threadsafety static="true" instance="true" /> @@ -71,7 +71,7 @@ namespace log4net #region Private Instance Constructors /// <summary> - /// Initializes a new instance of the <see cref="NDC" /> class. + /// Initializes a new instance of the <see cref="NDC" /> class. /// </summary> /// <remarks> /// Uses a private access modifier to prevent instantiation of this class. @@ -99,7 +99,7 @@ namespace log4net /// The number of context values pushed onto the context stack. /// </para> /// <para> - /// Used to record the current depth of the context. This can then + /// Used to record the current depth of the context. This can then /// be restored using the <see cref="SetMaxDepth"/> method. /// </para> /// </remarks> @@ -129,7 +129,7 @@ namespace log4net /// </para> /// </remarks> /*[Obsolete("NDC has been replaced by ThreadContext.Stacks")]*/ - public static void Clear() + public static void Clear() { ThreadContext.Stacks["NDC"].Clear(); } @@ -146,13 +146,13 @@ namespace log4net /// </para> /// </note> /// <para> - /// The results of this method can be passed to the <see cref="Inherit"/> - /// method to allow child threads to inherit the context of their + /// The results of this method can be passed to the <see cref="Inherit"/> + /// method to allow child threads to inherit the context of their /// parent thread. /// </para> /// </remarks> /*[Obsolete("NDC has been replaced by ThreadContext.Stacks")]*/ - public static Stack CloneStack() + public static Stack CloneStack() { return ThreadContext.Stacks["NDC"].InternalStack; } @@ -179,7 +179,7 @@ namespace log4net /// </para> /// </remarks> /*[Obsolete("NDC has been replaced by ThreadContext.Stacks", true)]*/ - public static void Inherit(Stack stack) + public static void Inherit(Stack stack) { ThreadContext.Stacks["NDC"].InternalStack = stack; } @@ -188,7 +188,7 @@ namespace log4net /// Removes the top context from the stack. /// </summary> /// <returns> - /// The message in the context that was removed from the top + /// The message in the context that was removed from the top /// of the stack. /// </returns> /// <remarks> @@ -205,7 +205,7 @@ namespace log4net /// </para> /// </remarks> /*[Obsolete("NDC has been replaced by ThreadContext.Stacks")]*/ - public static string Pop() + public static string Pop() { return ThreadContext.Stacks["NDC"].Pop(); } @@ -215,7 +215,7 @@ namespace log4net /// </summary> /// <param name="message">The new context message.</param> /// <returns> - /// An <see cref="IDisposable"/> that can be used to clean up + /// An <see cref="IDisposable"/> that can be used to clean up /// the context stack. /// </returns> /// <remarks> @@ -241,7 +241,7 @@ namespace log4net /// </code> /// </example> /*[Obsolete("NDC has been replaced by ThreadContext.Stacks")]*/ - public static IDisposable Push(string message) + public static IDisposable Push(string message) { return ThreadContext.Stacks["NDC"].Push(message); } @@ -252,7 +252,7 @@ namespace log4net /// <param name="messageFormat">The new context message string format.</param> /// <param name="args">Arguments to be passed into messageFormat.</param> /// <returns> - /// An <see cref="IDisposable"/> that can be used to clean up + /// An <see cref="IDisposable"/> that can be used to clean up /// the context stack. /// </returns> /// <remarks> @@ -300,7 +300,7 @@ namespace log4net /// </para> /// </remarks> /*[Obsolete("NDC has been replaced by ThreadContext.Stacks")]*/ - public static void Remove() + public static void Remove() { } @@ -317,14 +317,14 @@ namespace log4net /// </note> /// <para> /// Forces the stack depth to be at most <paramref name="maxDepth"/>. - /// This may truncate the head of the stack. This only affects the + /// This may truncate the head of the stack. This only affects the /// stack in the current thread. Also it does not prevent it from /// growing, it only sets the maximum depth at the time of the /// call. This can be used to return to a known context depth. /// </para> /// </remarks> /*[Obsolete("NDC has been replaced by ThreadContext.Stacks")]*/ - public static void SetMaxDepth(int maxDepth) + public static void SetMaxDepth(int maxDepth) { if (maxDepth >= 0) { http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/8a5b4204/src/ObjectRenderer/DefaultRenderer.cs ---------------------------------------------------------------------- diff --git a/src/ObjectRenderer/DefaultRenderer.cs b/src/ObjectRenderer/DefaultRenderer.cs index 8dc603d..5617e22 100644 --- a/src/ObjectRenderer/DefaultRenderer.cs +++ b/src/ObjectRenderer/DefaultRenderer.cs @@ -1,10 +1,10 @@ #region Apache License // -// Licensed to the Apache Software Foundation (ASF) under one or more +// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright ownership. +// this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, Version 2.0 -// (the "License"); you may not use this file except in compliance with +// (the "License"); you may not use this file except in compliance with // the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 @@ -97,13 +97,13 @@ namespace log4net.ObjectRenderer /// For a one dimensional array this is the /// array type name, an open brace, followed by a comma /// separated list of the elements (using the appropriate - /// renderer), followed by a close brace. + /// renderer), followed by a close brace. /// </para> /// <para> /// For example: <c>int[] {1, 2, 3}</c>. /// </para> /// <para> - /// If the array is not one dimensional the + /// If the array is not one dimensional the /// <c>Array.ToString()</c> is returned. /// </para> /// </description> @@ -120,23 +120,23 @@ namespace log4net.ObjectRenderer /// For example: <c>{a, b, c}</c>. /// </para> /// <para> - /// All collection classes that implement <see cref="ICollection"/> its subclasses, + /// All collection classes that implement <see cref="ICollection"/> its subclasses, /// or generic equivalents all implement the <see cref="IEnumerable"/> interface. /// </para> /// </description> - /// </item> + /// </item> /// <item> /// <term><see cref="DictionaryEntry"/></term> /// <description> /// <para> /// Rendered as the key, an equals sign ('='), and the value (using the appropriate - /// renderer). + /// renderer). /// </para> /// <para> /// For example: <c>key=value</c>. /// </para> /// </description> - /// </item> + /// </item> /// <item> /// <term>other</term> /// <description> @@ -157,7 +157,7 @@ namespace log4net.ObjectRenderer writer.Write(SystemInfo.NullText); return; } - + Array objArray = obj as Array; if (objArray != null) { @@ -177,11 +177,11 @@ namespace log4net.ObjectRenderer writer.Write("{}"); return; } - + // This is a special check to allow us to get the enumerator from the IDictionary // interface as this guarantees us DictionaryEntry objects. Note that in .NET 2.0 // the generic IDictionary<> interface enumerates KeyValuePair objects rather than - // DictionaryEntry ones. However the implementation of the plain IDictionary + // DictionaryEntry ones. However the implementation of the plain IDictionary // interface on the generic Dictionary<> still returns DictionaryEntry objects. IDictionary objDictionary = obj as IDictionary; if (objDictionary != null) @@ -200,7 +200,7 @@ namespace log4net.ObjectRenderer RenderEnumerator(rendererMap, objEnumerator, writer); return; } - + if (obj is DictionaryEntry) { RenderDictionaryEntry(rendererMap, (DictionaryEntry)obj, writer); @@ -228,7 +228,7 @@ namespace log4net.ObjectRenderer /// <c>int[] {1, 2, 3}</c>. /// </para> /// <para> - /// If the array is not one dimensional the + /// If the array is not one dimensional the /// <c>Array.ToString()</c> is returned. /// </para> /// </remarks> @@ -305,6 +305,6 @@ namespace log4net.ObjectRenderer rendererMap.FindAndRender(entry.Key, writer); writer.Write("="); rendererMap.FindAndRender(entry.Value, writer); - } + } } } http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/8a5b4204/src/ObjectRenderer/IObjectRenderer.cs ---------------------------------------------------------------------- diff --git a/src/ObjectRenderer/IObjectRenderer.cs b/src/ObjectRenderer/IObjectRenderer.cs index 3a79d1e..92c4dfe 100644 --- a/src/ObjectRenderer/IObjectRenderer.cs +++ b/src/ObjectRenderer/IObjectRenderer.cs @@ -1,10 +1,10 @@ #region Apache License // -// Licensed to the Apache Software Foundation (ASF) under one or more +// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright ownership. +// this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, Version 2.0 -// (the "License"); you may not use this file except in compliance with +// (the "License"); you may not use this file except in compliance with // the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 @@ -45,7 +45,7 @@ namespace log4net.ObjectRenderer /// <param name="writer">The writer to render to</param> /// <remarks> /// <para> - /// Render the object <paramref name="obj"/> to a + /// Render the object <paramref name="obj"/> to a /// string. /// </para> /// <para> http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/8a5b4204/src/ObjectRenderer/RendererMap.cs ---------------------------------------------------------------------- diff --git a/src/ObjectRenderer/RendererMap.cs b/src/ObjectRenderer/RendererMap.cs index 7f4db96..91833db 100644 --- a/src/ObjectRenderer/RendererMap.cs +++ b/src/ObjectRenderer/RendererMap.cs @@ -1,10 +1,10 @@ #region Apache License // -// Licensed to the Apache Software Foundation (ASF) under one or more +// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright ownership. +// this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, Version 2.0 -// (the "License"); you may not use this file except in compliance with +// (the "License"); you may not use this file except in compliance with // the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 @@ -66,7 +66,7 @@ namespace log4net.ObjectRenderer /// Default constructor. /// </para> /// </remarks> - public RendererMap() + public RendererMap() { m_map = System.Collections.Hashtable.Synchronized(new System.Collections.Hashtable()); } @@ -113,13 +113,13 @@ namespace log4net.ObjectRenderer /// as a <see cref="string"/>. /// </para> /// </remarks> - public void FindAndRender(object obj, TextWriter writer) + public void FindAndRender(object obj, TextWriter writer) { if (obj == null) { writer.Write(SystemInfo.NullText); } - else + else { // Optimisation for strings string str = obj as string; @@ -178,13 +178,13 @@ namespace log4net.ObjectRenderer /// Gets the renderer for the specified object type. /// </param> /// <param> - /// Syntactic sugar method that calls <see cref="M:Get(Type)"/> + /// Syntactic sugar method that calls <see cref="M:Get(Type)"/> /// with the type of the object parameter. /// </param> /// </remarks> - public IObjectRenderer Get(Object obj) + public IObjectRenderer Get(Object obj) { - if (obj == null) + if (obj == null) { return null; } @@ -193,7 +193,7 @@ namespace log4net.ObjectRenderer return Get(obj.GetType()); } } - + /// <summary> /// Gets the renderer for the specified type /// </summary> @@ -206,7 +206,7 @@ namespace log4net.ObjectRenderer /// <see cref="DefaultRenderer"/> will be returned. /// </para> /// </remarks> - public IObjectRenderer Get(Type type) + public IObjectRenderer Get(Type type) { if (type == null) { @@ -245,28 +245,28 @@ namespace log4net.ObjectRenderer } return result; - } + } /// <summary> /// Internal function to recursively search interfaces /// </summary> /// <param name="type">the type to lookup the renderer for</param> /// <returns>the renderer for the specified type</returns> - private IObjectRenderer SearchTypeAndInterfaces(Type type) + private IObjectRenderer SearchTypeAndInterfaces(Type type) { IObjectRenderer r = (IObjectRenderer)m_map[type]; - if (r != null) + if (r != null) { return r; - } - else + } + else { foreach(Type t in type.GetInterfaces()) { r = SearchTypeAndInterfaces(t); if (r != null) { - return r; + return r; } } } @@ -297,14 +297,14 @@ namespace log4net.ObjectRenderer /// cannot be removed. /// </para> /// </remarks> - public void Clear() + public void Clear() { m_map.Clear(); m_cache.Clear(); } /// <summary> - /// Register an <see cref="IObjectRenderer"/> for <paramref name="typeToRender"/>. + /// Register an <see cref="IObjectRenderer"/> for <paramref name="typeToRender"/>. /// </summary> /// <param name="typeToRender">the type that will be rendered by <paramref name="renderer"/></param> /// <param name="renderer">the renderer for <paramref name="typeToRender"/></param> @@ -315,7 +315,7 @@ namespace log4net.ObjectRenderer /// specifying the same <paramref name="typeToRender"/> as an argument. /// </para> /// </remarks> - public void Put(Type typeToRender, IObjectRenderer renderer) + public void Put(Type typeToRender, IObjectRenderer renderer) { m_cache.Clear(); @@ -329,6 +329,6 @@ namespace log4net.ObjectRenderer } m_map[typeToRender] = renderer; - } + } } } http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/8a5b4204/src/Plugin/IPlugin.cs ---------------------------------------------------------------------- diff --git a/src/Plugin/IPlugin.cs b/src/Plugin/IPlugin.cs index 065898e..d6c0d2b 100644 --- a/src/Plugin/IPlugin.cs +++ b/src/Plugin/IPlugin.cs @@ -1,10 +1,10 @@ #region Apache License // -// Licensed to the Apache Software Foundation (ASF) under one or more +// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright ownership. +// this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, Version 2.0 -// (the "License"); you may not use this file except in compliance with +// (the "License"); you may not use this file except in compliance with // the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 @@ -75,7 +75,7 @@ namespace log4net.Plugin /// </summary> /// <remarks> /// <para> - /// This method is called to notify the plugin that + /// This method is called to notify the plugin that /// it should stop operating and should detach from /// the repository. /// </para> http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/8a5b4204/src/Plugin/IPluginFactory.cs ---------------------------------------------------------------------- diff --git a/src/Plugin/IPluginFactory.cs b/src/Plugin/IPluginFactory.cs index 460a4d4..a09543b 100644 --- a/src/Plugin/IPluginFactory.cs +++ b/src/Plugin/IPluginFactory.cs @@ -1,10 +1,10 @@ #region Apache License // -// Licensed to the Apache Software Foundation (ASF) under one or more +// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright ownership. +// this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, Version 2.0 -// (the "License"); you may not use this file except in compliance with +// (the "License"); you may not use this file except in compliance with // the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/8a5b4204/src/Plugin/PluginCollection.cs ---------------------------------------------------------------------- diff --git a/src/Plugin/PluginCollection.cs b/src/Plugin/PluginCollection.cs index 7e7d4e2..eeea65b 100644 --- a/src/Plugin/PluginCollection.cs +++ b/src/Plugin/PluginCollection.cs @@ -1,10 +1,10 @@ #region Apache License // -// Licensed to the Apache Software Foundation (ASF) under one or more +// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright ownership. +// this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, Version 2.0 -// (the "License"); you may not use this file except in compliance with +// (the "License"); you may not use this file except in compliance with // the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 @@ -48,7 +48,7 @@ namespace log4net.Plugin /// Advances the enumerator to the next element in the collection. /// </summary> /// <returns> - /// <c>true</c> if the enumerator was successfully advanced to the next element; + /// <c>true</c> if the enumerator was successfully advanced to the next element; /// <c>false</c> if the enumerator has passed the end of the collection. /// </returns> /// <exception cref="InvalidOperationException"> @@ -73,7 +73,7 @@ namespace log4net.Plugin private int m_version = 0; #endregion Implementation (data) - + #region Static Wrappers /// <summary> @@ -102,7 +102,7 @@ namespace log4net.Plugin { m_array = new IPlugin[DEFAULT_CAPACITY]; } - + /// <summary> /// Initializes a new instance of the <c>PluginCollection</c> class /// that has the specified initial capacity. @@ -136,7 +136,7 @@ namespace log4net.Plugin m_array = new IPlugin[a.Length]; AddRange(a); } - + /// <summary> /// Initializes a new instance of the <c>PluginCollection</c> class /// that contains elements copied from the specified <see cref="IPlugin"/> collection. @@ -153,7 +153,7 @@ namespace log4net.Plugin /// Used to access protected constructor /// </summary> /// <exclude/> - protected internal enum Tag + protected internal enum Tag { /// <summary> /// A value @@ -172,7 +172,7 @@ namespace log4net.Plugin } #endregion - + #region Operations (type-safe ICollection) /// <summary> @@ -205,8 +205,8 @@ namespace log4net.Plugin { throw new System.ArgumentException("Destination array was not long enough."); } - - Array.Copy(m_array, 0, array, start, m_count); + + Array.Copy(m_array, 0, array, start, m_count); } /// <summary> @@ -230,7 +230,7 @@ namespace log4net.Plugin } #endregion - + #region Operations (type-safe IList) /// <summary> @@ -250,13 +250,13 @@ namespace log4net.Plugin get { ValidateIndex(index); // throws - return m_array[index]; + return m_array[index]; } set { ValidateIndex(index); // throws - ++m_version; - m_array[index] = value; + ++m_version; + m_array[index] = value; } } @@ -277,7 +277,7 @@ namespace log4net.Plugin return m_count++; } - + /// <summary> /// Removes all elements from the <c>PluginCollection</c>. /// </summary> @@ -287,7 +287,7 @@ namespace log4net.Plugin m_array = new IPlugin[DEFAULT_CAPACITY]; m_count = 0; } - + /// <summary> /// Creates a shallow copy of the <see cref="PluginCollection"/>. /// </summary> @@ -325,7 +325,7 @@ namespace log4net.Plugin /// </summary> /// <param name="item">The <see cref="IPlugin"/> to locate in the <c>PluginCollection</c>.</param> /// <returns> - /// The zero-based index of the first occurrence of <paramref name="item"/> + /// The zero-based index of the first occurrence of <paramref name="item"/> /// in the entire <c>PluginCollection</c>, if found; otherwise, -1. /// </returns> public virtual int IndexOf(IPlugin item) @@ -353,7 +353,7 @@ namespace log4net.Plugin public virtual void Insert(int index, IPlugin item) { ValidateIndex(index, true); // throws - + if (m_count == m_array.Length) { EnsureCapacity(m_count + 1); @@ -377,7 +377,7 @@ namespace log4net.Plugin /// The specified <see cref="IPlugin"/> was not found in the <c>PluginCollection</c>. /// </exception> public virtual void Remove(IPlugin item) - { + { int i = IndexOf(item); if (i < 0) { @@ -399,16 +399,16 @@ namespace log4net.Plugin public virtual void RemoveAt(int index) { ValidateIndex(index); // throws - + m_count--; if (index < m_count) { Array.Copy(m_array, index + 1, m_array, index, m_count - index); } - + // We can't set the deleted entry equal to null, because it might be a value type. - // Instead, we'll create an empty single-element array of the right type and copy it + // Instead, we'll create an empty single-element array of the right type and copy it // over the entry we want to erase. IPlugin[] temp = new IPlugin[1]; Array.Copy(temp, 0, m_array, m_count, 1); @@ -436,7 +436,7 @@ namespace log4net.Plugin #endregion #region Operations (type-safe IEnumerable) - + /// <summary> /// Returns an enumerator that can iterate through the <c>PluginCollection</c>. /// </summary> @@ -449,7 +449,7 @@ namespace log4net.Plugin #endregion #region Public helpers (just to mimic some nice features of ArrayList) - + /// <summary> /// Gets or sets the number of elements the <c>PluginCollection</c> can contain. /// </summary> @@ -458,9 +458,9 @@ namespace log4net.Plugin /// </value> public virtual int Capacity { - get - { - return m_array.Length; + get + { + return m_array.Length; } set { @@ -496,7 +496,7 @@ namespace log4net.Plugin { EnsureCapacity(m_count + x.Count); } - + Array.Copy(x.m_array, 0, m_array, m_count, x.Count); m_count += x.Count; m_version++; @@ -542,7 +542,7 @@ namespace log4net.Plugin return m_count; } - + /// <summary> /// Sets the capacity to the actual number of elements. /// </summary> @@ -591,7 +591,7 @@ namespace log4net.Plugin } #endregion - + #region Implementation (ICollection) void ICollection.CopyTo(Array array, int start) @@ -659,15 +659,15 @@ namespace log4net.Plugin private sealed class Enumerator : IEnumerator, IPluginCollectionEnumerator { #region Implementation (data) - + private readonly PluginCollection m_collection; private int m_index; private int m_version; - + #endregion Implementation (data) - + #region Construction - + /// <summary> /// Initializes a new instance of the <c>Enumerator</c> class. /// </summary> @@ -678,11 +678,11 @@ namespace log4net.Plugin m_index = -1; m_version = tc.m_version; } - + #endregion - + #region Operations (type-safe IEnumerator) - + /// <summary> /// Gets the current element in the collection. /// </summary> @@ -698,7 +698,7 @@ namespace log4net.Plugin /// Advances the enumerator to the next element in the collection. /// </summary> /// <returns> - /// <c>true</c> if the enumerator was successfully advanced to the next element; + /// <c>true</c> if the enumerator was successfully advanced to the next element; /// <c>false</c> if the enumerator has passed the end of the collection. /// </returns> /// <exception cref="InvalidOperationException"> @@ -724,14 +724,14 @@ namespace log4net.Plugin } #endregion - + #region Implementation (IEnumerator) - + object IEnumerator.Current { get { return this.Current; } } - + #endregion } @@ -797,7 +797,7 @@ namespace log4net.Plugin { throw new NotSupportedException("This is a Read Only Collection and can not be modified"); } - + public override void Clear() { throw new NotSupportedException("This is a Read Only Collection and can not be modified"); @@ -819,7 +819,7 @@ namespace log4net.Plugin } public override void Remove(IPlugin x) - { + { throw new NotSupportedException("This is a Read Only Collection and can not be modified"); }