http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/8a5b4204/src/Util/CountingQuietTextWriter.cs ---------------------------------------------------------------------- diff --git a/src/Util/CountingQuietTextWriter.cs b/src/Util/CountingQuietTextWriter.cs index aa2947a..0a4490e 100644 --- a/src/Util/CountingQuietTextWriter.cs +++ b/src/Util/CountingQuietTextWriter.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 @@ -25,7 +25,7 @@ using log4net.Core; namespace log4net.Util { /// <summary> - /// Subclass of <see cref="QuietTextWriter"/> that maintains a count of + /// Subclass of <see cref="QuietTextWriter"/> that maintains a count of /// the number of bytes written. /// </summary> /// <remarks> @@ -35,7 +35,7 @@ namespace log4net.Util /// </remarks> /// <author>Nicko Cadell</author> /// <author>Gert Driesen</author> - public class CountingQuietTextWriter : QuietTextWriter + public class CountingQuietTextWriter : QuietTextWriter { #region Public Instance Constructors @@ -46,7 +46,7 @@ namespace log4net.Util /// <param name="errorHandler">The <see cref="IErrorHandler" /> to report errors to.</param> /// <remarks> /// <para> - /// Creates a new instance of the <see cref="CountingQuietTextWriter" /> class + /// Creates a new instance of the <see cref="CountingQuietTextWriter" /> class /// with the specified <see cref="TextWriter" /> and <see cref="IErrorHandler" />. /// </para> /// </remarks> @@ -58,7 +58,7 @@ namespace log4net.Util #endregion Public Instance Constructors #region Override implementation of QuietTextWriter - + /// <summary> /// Writes a character to the underlying writer and counts the number of bytes written. /// </summary> @@ -69,22 +69,22 @@ namespace log4net.Util /// the number of bytes written. /// </para> /// </remarks> - public override void Write(char value) + public override void Write(char value) { - try + try { base.Write(value); - // get the number of bytes needed to represent the + // get the number of bytes needed to represent the // char using the supplied encoding. m_countBytes += this.Encoding.GetByteCount(new char[] { value }); - } - catch(Exception e) + } + catch(Exception e) { this.ErrorHandler.Error("Failed to write [" + value + "].", e, ErrorCode.WriteFailure); } } - + /// <summary> /// Writes a buffer to the underlying writer and counts the number of bytes written. /// </summary> @@ -97,19 +97,19 @@ namespace log4net.Util /// the number of bytes written. /// </para> /// </remarks> - public override void Write(char[] buffer, int index, int count) + public override void Write(char[] buffer, int index, int count) { if (count > 0) { - try + try { base.Write(buffer, index, count); - // get the number of bytes needed to represent the + // get the number of bytes needed to represent the // char array using the supplied encoding. m_countBytes += this.Encoding.GetByteCount(buffer, index, count); - } - catch(Exception e) + } + catch(Exception e) { this.ErrorHandler.Error("Failed to write buffer.", e, ErrorCode.WriteFailure); } @@ -126,25 +126,25 @@ namespace log4net.Util /// the number of bytes written. /// </para> /// </remarks> - override public void Write(string str) + override public void Write(string str) { if (str != null && str.Length > 0) { - try + try { base.Write(str); - // get the number of bytes needed to represent the + // get the number of bytes needed to represent the // string using the supplied encoding. m_countBytes += this.Encoding.GetByteCount(str); } - catch(Exception e) + catch(Exception e) { this.ErrorHandler.Error("Failed to write [" + str + "].", e, ErrorCode.WriteFailure); } } } - + #endregion Override implementation of QuietTextWriter #region Public Instance Properties @@ -160,14 +160,14 @@ namespace log4net.Util /// Gets or sets the total number of bytes written. /// </para> /// </remarks> - public long Count + public long Count { get { return m_countBytes; } set { m_countBytes = value; } } #endregion Public Instance Properties - + #region Private Instance Fields /// <summary>
http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/8a5b4204/src/Util/CyclicBuffer.cs ---------------------------------------------------------------------- diff --git a/src/Util/CyclicBuffer.cs b/src/Util/CyclicBuffer.cs index bc8c902..eb9b5ec 100644 --- a/src/Util/CyclicBuffer.cs +++ b/src/Util/CyclicBuffer.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 @@ -43,14 +43,14 @@ namespace log4net.Util /// <param name="maxSize">The maximum number of logging events in the buffer.</param> /// <remarks> /// <para> - /// Initializes a new instance of the <see cref="CyclicBuffer" /> class with + /// Initializes a new instance of the <see cref="CyclicBuffer" /> class with /// the specified maximum number of buffered logging events. /// </para> /// </remarks> /// <exception cref="ArgumentOutOfRangeException">The <paramref name="maxSize"/> argument is not a positive integer.</exception> - public CyclicBuffer(int maxSize) + public CyclicBuffer(int maxSize) { - if (maxSize < 1) + if (maxSize < 1) { throw SystemInfo.CreateArgumentOutOfRangeException("maxSize", (object)maxSize, "Parameter: maxSize, Value: [" + maxSize + "] out of range. Non zero positive integer required"); } @@ -65,7 +65,7 @@ namespace log4net.Util #endregion Public Instance Constructors #region Public Instance Methods - + /// <summary> /// Appends a <paramref name="loggingEvent"/> to the buffer. /// </summary> @@ -79,7 +79,7 @@ namespace log4net.Util /// </para> /// </remarks> public LoggingEvent Append(LoggingEvent loggingEvent) - { + { if (loggingEvent == null) { throw new ArgumentNullException("loggingEvent"); @@ -91,7 +91,7 @@ namespace log4net.Util LoggingEvent discardedLoggingEvent = m_events[m_last]; // overwrite the last event position - m_events[m_last] = loggingEvent; + m_events[m_last] = loggingEvent; if (++m_last == m_maxSize) { m_last = 0; @@ -125,16 +125,16 @@ namespace log4net.Util /// <returns>The oldest logging event in the buffer</returns> /// <remarks> /// <para> - /// Gets the oldest (first) logging event in the buffer and removes it + /// Gets the oldest (first) logging event in the buffer and removes it /// from the buffer. /// </para> /// </remarks> - public LoggingEvent PopOldest() + public LoggingEvent PopOldest() { lock(this) { LoggingEvent ret = null; - if (m_numElems > 0) + if (m_numElems > 0) { m_numElems--; ret = m_events[m_first]; @@ -143,7 +143,7 @@ namespace log4net.Util { m_first = 0; } - } + } return ret; } } @@ -217,11 +217,11 @@ namespace log4net.Util /// </para> /// </remarks> /// <exception cref="ArgumentOutOfRangeException">The <paramref name="newSize"/> argument is not a positive integer.</exception> - public void Resize(int newSize) + public void Resize(int newSize) { lock(this) { - if (newSize < 0) + if (newSize < 0) { throw log4net.Util.SystemInfo.CreateArgumentOutOfRangeException("newSize", (object)newSize, "Parameter: newSize, Value: [" + newSize + "] out of range. Non zero positive integer required"); } @@ -229,17 +229,17 @@ namespace log4net.Util { return; // nothing to do } - + LoggingEvent[] temp = new LoggingEvent[newSize]; int loopLen = (newSize < m_numElems) ? newSize : m_numElems; - - for(int i = 0; i < loopLen; i++) + + for(int i = 0; i < loopLen; i++) { temp[i] = m_events[m_first]; m_events[m_first] = null; - if (++m_first == m_numElems) + if (++m_first == m_numElems) { m_first = 0; } @@ -250,11 +250,11 @@ namespace log4net.Util m_numElems = loopLen; m_maxSize = newSize; - if (loopLen == newSize) + if (loopLen == newSize) { m_last = 0; - } - else + } + else { m_last = loopLen; } @@ -276,7 +276,7 @@ namespace log4net.Util /// currently in the buffer, then <c>null</c> is returned. /// </para> /// </remarks> - public LoggingEvent this[int i] + public LoggingEvent this[int i] { get { @@ -301,20 +301,20 @@ namespace log4net.Util /// Gets the maximum size of the buffer /// </para> /// </remarks> - public int MaxSize + public int MaxSize { - get - { + get + { lock(this) { - return m_maxSize; + return m_maxSize; } } #if RESIZABLE_CYCLIC_BUFFER - set - { + set + { /// Setting the MaxSize will cause the buffer to resize. - Resize(value); + Resize(value); } #endif } @@ -331,13 +331,13 @@ namespace log4net.Util /// </remarks> public int Length { - get - { - lock(this) - { - return m_numElems; + get + { + lock(this) + { + return m_numElems; } - } + } } #endregion Public Instance Properties @@ -345,8 +345,8 @@ namespace log4net.Util #region Private Instance Fields private LoggingEvent[] m_events; - private int m_first; - private int m_last; + private int m_first; + private int m_last; private int m_numElems; private int m_maxSize; http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/8a5b4204/src/Util/EmptyCollection.cs ---------------------------------------------------------------------- diff --git a/src/Util/EmptyCollection.cs b/src/Util/EmptyCollection.cs index ad5f1d8..342dd2b 100644 --- a/src/Util/EmptyCollection.cs +++ b/src/Util/EmptyCollection.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 @@ -41,7 +41,7 @@ namespace log4net.Util #region Private Instance Constructors /// <summary> - /// Initializes a new instance of the <see cref="EmptyCollection" /> class. + /// Initializes a new instance of the <see cref="EmptyCollection" /> class. /// </summary> /// <remarks> /// <para> @@ -53,7 +53,7 @@ namespace log4net.Util } #endregion Private Instance Constructors - + #region Public Static Properties /// <summary> @@ -75,14 +75,14 @@ namespace log4net.Util #region Implementation of ICollection /// <summary> - /// Copies the elements of the <see cref="ICollection"/> to an + /// Copies the elements of the <see cref="ICollection"/> to an /// <see cref="Array"/>, starting at a particular Array index. /// </summary> - /// <param name="array">The one-dimensional <see cref="Array"/> - /// that is the destination of the elements copied from - /// <see cref="ICollection"/>. The Array must have zero-based + /// <param name="array">The one-dimensional <see cref="Array"/> + /// that is the destination of the elements copied from + /// <see cref="ICollection"/>. The Array must have zero-based /// indexing.</param> - /// <param name="index">The zero-based index in array at which + /// <param name="index">The zero-based index in array at which /// copying begins.</param> /// <remarks> /// <para> @@ -151,7 +151,7 @@ namespace log4net.Util /// Returns an enumerator that can iterate through a collection. /// </summary> /// <returns> - /// An <see cref="IEnumerator"/> that can be used to + /// An <see cref="IEnumerator"/> that can be used to /// iterate through the collection. /// </returns> /// <remarks> @@ -172,7 +172,7 @@ namespace log4net.Util /// The singleton instance of the empty collection. /// </summary> private readonly static EmptyCollection s_instance = new EmptyCollection(); - + #endregion Private Static Fields } } http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/8a5b4204/src/Util/EmptyDictionary.cs ---------------------------------------------------------------------- diff --git a/src/Util/EmptyDictionary.cs b/src/Util/EmptyDictionary.cs index 2c9192d..1a40c73 100644 --- a/src/Util/EmptyDictionary.cs +++ b/src/Util/EmptyDictionary.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 @@ -41,7 +41,7 @@ namespace log4net.Util #region Private Instance Constructors /// <summary> - /// Initializes a new instance of the <see cref="EmptyDictionary" /> class. + /// Initializes a new instance of the <see cref="EmptyDictionary" /> class. /// </summary> /// <remarks> /// <para> @@ -53,7 +53,7 @@ namespace log4net.Util } #endregion Private Instance Constructors - + #region Public Static Properties /// <summary> @@ -75,14 +75,14 @@ namespace log4net.Util #region Implementation of ICollection /// <summary> - /// Copies the elements of the <see cref="ICollection"/> to an + /// Copies the elements of the <see cref="ICollection"/> to an /// <see cref="Array"/>, starting at a particular Array index. /// </summary> - /// <param name="array">The one-dimensional <see cref="Array"/> - /// that is the destination of the elements copied from - /// <see cref="ICollection"/>. The Array must have zero-based + /// <param name="array">The one-dimensional <see cref="Array"/> + /// that is the destination of the elements copied from + /// <see cref="ICollection"/>. The Array must have zero-based /// indexing.</param> - /// <param name="index">The zero-based index in array at which + /// <param name="index">The zero-based index in array at which /// copying begins.</param> /// <remarks> /// <para> @@ -151,7 +151,7 @@ namespace log4net.Util /// Returns an enumerator that can iterate through a collection. /// </summary> /// <returns> - /// An <see cref="IEnumerator"/> that can be used to + /// An <see cref="IEnumerator"/> that can be used to /// iterate through the collection. /// </returns> /// <remarks> @@ -169,7 +169,7 @@ namespace log4net.Util #region Implementation of IDictionary /// <summary> - /// Adds an element with the provided key and value to the + /// Adds an element with the provided key and value to the /// <see cref="EmptyDictionary" />. /// </summary> /// <param name="key">The <see cref="object" /> to use as the key of the element to add.</param> @@ -202,7 +202,7 @@ namespace log4net.Util } /// <summary> - /// Determines whether the <see cref="EmptyDictionary" /> contains an element + /// Determines whether the <see cref="EmptyDictionary" /> contains an element /// with the specified key. /// </summary> /// <param name="key">The key to locate in the <see cref="EmptyDictionary" />.</param> @@ -221,7 +221,7 @@ namespace log4net.Util /// Returns an enumerator that can iterate through a collection. /// </summary> /// <returns> - /// An <see cref="IEnumerator"/> that can be used to + /// An <see cref="IEnumerator"/> that can be used to /// iterate through the collection. /// </returns> /// <remarks> @@ -313,7 +313,7 @@ namespace log4net.Util /// <value><c>null</c></value> /// <remarks> /// <para> - /// As the collection is empty no values can be looked up or stored. + /// As the collection is empty no values can be looked up or stored. /// If the index getter is called then <c>null</c> is returned. /// A <see cref="InvalidOperationException"/> is thrown if the setter is called. /// </para> @@ -333,7 +333,7 @@ namespace log4net.Util /// The singleton instance of the empty dictionary. /// </summary> private readonly static EmptyDictionary s_instance = new EmptyDictionary(); - + #endregion Private Static Fields } } http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/8a5b4204/src/Util/FormattingInfo.cs ---------------------------------------------------------------------- diff --git a/src/Util/FormattingInfo.cs b/src/Util/FormattingInfo.cs index 4a6c9bb..ccd71eb 100644 --- a/src/Util/FormattingInfo.cs +++ b/src/Util/FormattingInfo.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 @@ -23,7 +23,7 @@ using log4net.Util; namespace log4net.Util { /// <summary> - /// Contain the information obtained when parsing formatting modifiers + /// Contain the information obtained when parsing formatting modifiers /// in conversion modifiers. /// </summary> /// <remarks> @@ -47,7 +47,7 @@ namespace log4net.Util /// Initializes a new instance of the <see cref="FormattingInfo" /> class. /// </para> /// </remarks> - public FormattingInfo() + public FormattingInfo() { } @@ -60,7 +60,7 @@ namespace log4net.Util /// with the specified parameters. /// </para> /// </remarks> - public FormattingInfo(int min, int max, bool leftAlign) + public FormattingInfo(int min, int max, bool leftAlign) { m_min = min; m_max = max; http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/8a5b4204/src/Util/GlobalContextProperties.cs ---------------------------------------------------------------------- diff --git a/src/Util/GlobalContextProperties.cs b/src/Util/GlobalContextProperties.cs index b643107..b00ff6f 100644 --- a/src/Util/GlobalContextProperties.cs +++ b/src/Util/GlobalContextProperties.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 @@ -89,14 +89,14 @@ namespace log4net.Util /// <remarks> /// <para> /// Reading the value for a key is faster than setting the value. - /// When the value is written a new read only copy of + /// When the value is written a new read only copy of /// the properties is created. /// </para> /// </remarks> override public object this[string key] { - get - { + get + { return m_readOnlyProperties[key]; } set @@ -123,7 +123,7 @@ namespace log4net.Util /// <remarks> /// <para> /// Removing an entry from the global context properties is relatively expensive compared - /// with reading a value. + /// with reading a value. /// </para> /// </remarks> public void Remove(string key) http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/8a5b4204/src/Util/ILogExtensions.cs ---------------------------------------------------------------------- diff --git a/src/Util/ILogExtensions.cs b/src/Util/ILogExtensions.cs index 608d05d..5a2ad50 100644 --- a/src/Util/ILogExtensions.cs +++ b/src/Util/ILogExtensions.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 @@ -39,9 +39,9 @@ namespace log4net.Util /// <example>Simple example of logging messages /// <code lang="C#"> /// using log4net.Util; - /// + /// /// ILog log = LogManager.GetLogger("application-log"); - /// + /// /// log.InfoExt("Application Start"); /// log.DebugExt("This is a debug message"); /// </code> @@ -71,16 +71,16 @@ namespace log4net.Util /// This method first checks if this logger is <c>INFO</c> /// enabled by reading the value <seealso cref="ILog.IsDebugEnabled"/> property. /// This check happens always and does not depend on the <seealso cref="ILog"/> - /// implementation. If this logger is <c>INFO</c> enabled, then it converts - /// the message object (retrieved by invocation of the provided callback) to a + /// implementation. If this logger is <c>INFO</c> enabled, then it converts + /// the message object (retrieved by invocation of the provided callback) to a /// string by invoking the appropriate <see cref="log4net.ObjectRenderer.IObjectRenderer"/>. - /// It then proceeds to call all the registered appenders in this logger - /// and also higher in the hierarchy depending on the value of + /// It then proceeds to call all the registered appenders in this logger + /// and also higher in the hierarchy depending on the value of /// the additivity flag. /// </para> - /// <para><b>WARNING</b> Note that passing an <see cref="Exception"/> - /// to this method will print the name of the <see cref="Exception"/> - /// but no stack trace. To print a stack trace use the + /// <para><b>WARNING</b> Note that passing an <see cref="Exception"/> + /// to this method will print the name of the <see cref="Exception"/> + /// but no stack trace. To print a stack trace use the /// <see cref="DebugExt(ILog,Func{object},Exception)"/> form instead. /// </para> /// </remarks> @@ -146,16 +146,16 @@ namespace log4net.Util /// This method first checks if this logger is <c>INFO</c> /// enabled by reading the value <seealso cref="ILog.IsDebugEnabled"/> property. /// This check happens always and does not depend on the <seealso cref="ILog"/> - /// implementation. If this logger is <c>INFO</c> enabled, then it converts + /// implementation. If this logger is <c>INFO</c> enabled, then it converts /// the message object (passed as parameter) to a string by invoking the appropriate - /// <see cref="log4net.ObjectRenderer.IObjectRenderer"/>. It then - /// proceeds to call all the registered appenders in this logger - /// and also higher in the hierarchy depending on the value of + /// <see cref="log4net.ObjectRenderer.IObjectRenderer"/>. It then + /// proceeds to call all the registered appenders in this logger + /// and also higher in the hierarchy depending on the value of /// the additivity flag. /// </para> - /// <para><b>WARNING</b> Note that passing an <see cref="Exception"/> - /// to this method will print the name of the <see cref="Exception"/> - /// but no stack trace. To print a stack trace use the + /// <para><b>WARNING</b> Note that passing an <see cref="Exception"/> + /// to this method will print the name of the <see cref="Exception"/> + /// but no stack trace. To print a stack trace use the /// <see cref="DebugExt(ILog,object,Exception)"/> form instead. /// </para> /// </remarks> @@ -407,16 +407,16 @@ namespace log4net.Util /// This method first checks if this logger is <c>INFO</c> /// enabled by reading the value <seealso cref="ILog.IsInfoEnabled"/> property. /// This check happens always and does not depend on the <seealso cref="ILog"/> - /// implementation. If this logger is <c>INFO</c> enabled, then it converts - /// the message object (retrieved by invocation of the provided callback) to a + /// implementation. If this logger is <c>INFO</c> enabled, then it converts + /// the message object (retrieved by invocation of the provided callback) to a /// string by invoking the appropriate <see cref="log4net.ObjectRenderer.IObjectRenderer"/>. - /// It then proceeds to call all the registered appenders in this logger - /// and also higher in the hierarchy depending on the value of + /// It then proceeds to call all the registered appenders in this logger + /// and also higher in the hierarchy depending on the value of /// the additivity flag. /// </para> - /// <para><b>WARNING</b> Note that passing an <see cref="Exception"/> - /// to this method will print the name of the <see cref="Exception"/> - /// but no stack trace. To print a stack trace use the + /// <para><b>WARNING</b> Note that passing an <see cref="Exception"/> + /// to this method will print the name of the <see cref="Exception"/> + /// but no stack trace. To print a stack trace use the /// <see cref="InfoExt(ILog,Func{object},Exception)"/> form instead. /// </para> /// </remarks> @@ -482,16 +482,16 @@ namespace log4net.Util /// This method first checks if this logger is <c>INFO</c> /// enabled by reading the value <seealso cref="ILog.IsInfoEnabled"/> property. /// This check happens always and does not depend on the <seealso cref="ILog"/> - /// implementation. If this logger is <c>INFO</c> enabled, then it converts + /// implementation. If this logger is <c>INFO</c> enabled, then it converts /// the message object (passed as parameter) to a string by invoking the appropriate - /// <see cref="log4net.ObjectRenderer.IObjectRenderer"/>. It then - /// proceeds to call all the registered appenders in this logger - /// and also higher in the hierarchy depending on the value of + /// <see cref="log4net.ObjectRenderer.IObjectRenderer"/>. It then + /// proceeds to call all the registered appenders in this logger + /// and also higher in the hierarchy depending on the value of /// the additivity flag. /// </para> - /// <para><b>WARNING</b> Note that passing an <see cref="Exception"/> - /// to this method will print the name of the <see cref="Exception"/> - /// but no stack trace. To print a stack trace use the + /// <para><b>WARNING</b> Note that passing an <see cref="Exception"/> + /// to this method will print the name of the <see cref="Exception"/> + /// but no stack trace. To print a stack trace use the /// <see cref="InfoExt(ILog,object,Exception)"/> form instead. /// </para> /// </remarks> @@ -743,16 +743,16 @@ namespace log4net.Util /// This method first checks if this logger is <c>WARN</c> /// enabled by reading the value <seealso cref="ILog.IsWarnEnabled"/> property. /// This check happens always and does not depend on the <seealso cref="ILog"/> - /// implementation. If this logger is <c>WARN</c> enabled, then it converts - /// the message object (retrieved by invocation of the provided callback) to a + /// implementation. If this logger is <c>WARN</c> enabled, then it converts + /// the message object (retrieved by invocation of the provided callback) to a /// string by invoking the appropriate <see cref="log4net.ObjectRenderer.IObjectRenderer"/>. - /// It then proceeds to call all the registered appenders in this logger - /// and also higher in the hierarchy depending on the value of + /// It then proceeds to call all the registered appenders in this logger + /// and also higher in the hierarchy depending on the value of /// the additivity flag. /// </para> - /// <para><b>WARNING</b> Note that passing an <see cref="Exception"/> - /// to this method will print the name of the <see cref="Exception"/> - /// but no stack trace. To print a stack trace use the + /// <para><b>WARNING</b> Note that passing an <see cref="Exception"/> + /// to this method will print the name of the <see cref="Exception"/> + /// but no stack trace. To print a stack trace use the /// <see cref="WarnExt(ILog,Func{object},Exception)"/> form instead. /// </para> /// </remarks> @@ -818,16 +818,16 @@ namespace log4net.Util /// This method first checks if this logger is <c>WARN</c> /// enabled by reading the value <seealso cref="ILog.IsWarnEnabled"/> property. /// This check happens always and does not depend on the <seealso cref="ILog"/> - /// implementation. If this logger is <c>WARN</c> enabled, then it converts + /// implementation. If this logger is <c>WARN</c> enabled, then it converts /// the message object (passed as parameter) to a string by invoking the appropriate - /// <see cref="log4net.ObjectRenderer.IObjectRenderer"/>. It then - /// proceeds to call all the registered appenders in this logger - /// and also higher in the hierarchy depending on the value of + /// <see cref="log4net.ObjectRenderer.IObjectRenderer"/>. It then + /// proceeds to call all the registered appenders in this logger + /// and also higher in the hierarchy depending on the value of /// the additivity flag. /// </para> - /// <para><b>WARNING</b> Note that passing an <see cref="Exception"/> - /// to this method will print the name of the <see cref="Exception"/> - /// but no stack trace. To print a stack trace use the + /// <para><b>WARNING</b> Note that passing an <see cref="Exception"/> + /// to this method will print the name of the <see cref="Exception"/> + /// but no stack trace. To print a stack trace use the /// <see cref="WarnExt(ILog,object,Exception)"/> form instead. /// </para> /// </remarks> @@ -1079,16 +1079,16 @@ namespace log4net.Util /// This method first checks if this logger is <c>ERROR</c> /// enabled by reading the value <seealso cref="ILog.IsErrorEnabled"/> property. /// This check happens always and does not depend on the <seealso cref="ILog"/> - /// implementation. If this logger is <c>ERROR</c> enabled, then it converts - /// the message object (retrieved by invocation of the provided callback) to a + /// implementation. If this logger is <c>ERROR</c> enabled, then it converts + /// the message object (retrieved by invocation of the provided callback) to a /// string by invoking the appropriate <see cref="log4net.ObjectRenderer.IObjectRenderer"/>. - /// It then proceeds to call all the registered appenders in this logger - /// and also higher in the hierarchy depending on the value of + /// It then proceeds to call all the registered appenders in this logger + /// and also higher in the hierarchy depending on the value of /// the additivity flag. /// </para> - /// <para><b>WARNING</b> Note that passing an <see cref="Exception"/> - /// to this method will print the name of the <see cref="Exception"/> - /// but no stack trace. To print a stack trace use the + /// <para><b>WARNING</b> Note that passing an <see cref="Exception"/> + /// to this method will print the name of the <see cref="Exception"/> + /// but no stack trace. To print a stack trace use the /// <see cref="ErrorExt(ILog,Func{object},Exception)"/> form instead. /// </para> /// </remarks> @@ -1154,16 +1154,16 @@ namespace log4net.Util /// This method first checks if this logger is <c>ERROR</c> /// enabled by reading the value <seealso cref="ILog.IsErrorEnabled"/> property. /// This check happens always and does not depend on the <seealso cref="ILog"/> - /// implementation. If this logger is <c>ERROR</c> enabled, then it converts + /// implementation. If this logger is <c>ERROR</c> enabled, then it converts /// the message object (passed as parameter) to a string by invoking the appropriate - /// <see cref="log4net.ObjectRenderer.IObjectRenderer"/>. It then - /// proceeds to call all the registered appenders in this logger - /// and also higher in the hierarchy depending on the value of + /// <see cref="log4net.ObjectRenderer.IObjectRenderer"/>. It then + /// proceeds to call all the registered appenders in this logger + /// and also higher in the hierarchy depending on the value of /// the additivity flag. /// </para> - /// <para><b>WARNING</b> Note that passing an <see cref="Exception"/> - /// to this method will print the name of the <see cref="Exception"/> - /// but no stack trace. To print a stack trace use the + /// <para><b>WARNING</b> Note that passing an <see cref="Exception"/> + /// to this method will print the name of the <see cref="Exception"/> + /// but no stack trace. To print a stack trace use the /// <see cref="ErrorExt(ILog,object,Exception)"/> form instead. /// </para> /// </remarks> @@ -1415,16 +1415,16 @@ namespace log4net.Util /// This method first checks if this logger is <c>FATAL</c> /// enabled by reading the value <seealso cref="ILog.IsFatalEnabled"/> property. /// This check happens always and does not depend on the <seealso cref="ILog"/> - /// implementation. If this logger is <c>FATAL</c> enabled, then it converts - /// the message object (retrieved by invocation of the provided callback) to a + /// implementation. If this logger is <c>FATAL</c> enabled, then it converts + /// the message object (retrieved by invocation of the provided callback) to a /// string by invoking the appropriate <see cref="log4net.ObjectRenderer.IObjectRenderer"/>. - /// It then proceeds to call all the registered appenders in this logger - /// and also higher in the hierarchy depending on the value of + /// It then proceeds to call all the registered appenders in this logger + /// and also higher in the hierarchy depending on the value of /// the additivity flag. /// </para> - /// <para><b>WARNING</b> Note that passing an <see cref="Exception"/> - /// to this method will print the name of the <see cref="Exception"/> - /// but no stack trace. To print a stack trace use the + /// <para><b>WARNING</b> Note that passing an <see cref="Exception"/> + /// to this method will print the name of the <see cref="Exception"/> + /// but no stack trace. To print a stack trace use the /// <see cref="FatalExt(ILog,Func{object},Exception)"/> form instead. /// </para> /// </remarks> @@ -1490,16 +1490,16 @@ namespace log4net.Util /// This method first checks if this logger is <c>FATAL</c> /// enabled by reading the value <seealso cref="ILog.IsFatalEnabled"/> property. /// This check happens always and does not depend on the <seealso cref="ILog"/> - /// implementation. If this logger is <c>FATAL</c> enabled, then it converts + /// implementation. If this logger is <c>FATAL</c> enabled, then it converts /// the message object (passed as parameter) to a string by invoking the appropriate - /// <see cref="log4net.ObjectRenderer.IObjectRenderer"/>. It then - /// proceeds to call all the registered appenders in this logger - /// and also higher in the hierarchy depending on the value of + /// <see cref="log4net.ObjectRenderer.IObjectRenderer"/>. It then + /// proceeds to call all the registered appenders in this logger + /// and also higher in the hierarchy depending on the value of /// the additivity flag. /// </para> - /// <para><b>WARNING</b> Note that passing an <see cref="Exception"/> - /// to this method will print the name of the <see cref="Exception"/> - /// but no stack trace. To print a stack trace use the + /// <para><b>WARNING</b> Note that passing an <see cref="Exception"/> + /// to this method will print the name of the <see cref="Exception"/> + /// but no stack trace. To print a stack trace use the /// <see cref="FatalExt(ILog,object,Exception)"/> form instead. /// </para> /// </remarks> http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/8a5b4204/src/Util/LevelMapping.cs ---------------------------------------------------------------------- diff --git a/src/Util/LevelMapping.cs b/src/Util/LevelMapping.cs index a2d4aff..01d0dc6 100644 --- a/src/Util/LevelMapping.cs +++ b/src/Util/LevelMapping.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 @@ -29,7 +29,7 @@ namespace log4net.Util /// </summary> /// <remarks> /// <para> - /// Manages an ordered mapping from <see cref="Level"/> instances + /// Manages an ordered mapping from <see cref="Level"/> instances /// to <see cref="LevelMappingEntry"/> subclasses. /// </para> /// </remarks> @@ -46,14 +46,14 @@ namespace log4net.Util /// Initialise a new instance of <see cref="LevelMapping"/>. /// </para> /// </remarks> - public LevelMapping() + public LevelMapping() { } #endregion // Public Instance Constructors #region Public Instance Methods - + /// <summary> /// Add a <see cref="LevelMappingEntry"/> to this mapping /// </summary> @@ -61,7 +61,7 @@ namespace log4net.Util /// <remarks> /// <para> /// If a <see cref="LevelMappingEntry"/> has previously been added - /// for the same <see cref="Level"/> then that entry will be + /// for the same <see cref="Level"/> then that entry will be /// overwritten. /// </para> /// </remarks> http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/8a5b4204/src/Util/LevelMappingEntry.cs ---------------------------------------------------------------------- diff --git a/src/Util/LevelMappingEntry.cs b/src/Util/LevelMappingEntry.cs index bfed35b..9791a59 100644 --- a/src/Util/LevelMappingEntry.cs +++ b/src/Util/LevelMappingEntry.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 @@ -46,7 +46,7 @@ namespace log4net.Util /// Default protected constructor /// </para> /// </remarks> - protected LevelMappingEntry() + protected LevelMappingEntry() { } @@ -55,10 +55,10 @@ namespace log4net.Util #region Public Instance Properties /// <summary> - /// The level that is the key for this mapping + /// The level that is the key for this mapping /// </summary> /// <value> - /// The <see cref="Level"/> that is the key for this mapping + /// The <see cref="Level"/> that is the key for this mapping /// </value> /// <remarks> /// <para> @@ -93,7 +93,7 @@ namespace log4net.Util #region Private Instance Fields - private Level m_level; + private Level m_level; #endregion // Private Instance Fields } http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/8a5b4204/src/Util/LogLog.cs ---------------------------------------------------------------------- diff --git a/src/Util/LogLog.cs b/src/Util/LogLog.cs index 9a9b4da..60ecd14 100644 --- a/src/Util/LogLog.cs +++ b/src/Util/LogLog.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 @@ -27,7 +27,7 @@ using System.Diagnostics; namespace log4net.Util { /// <summary> - /// + /// /// </summary> /// <param name="source"></param> /// <param name="e"></param> @@ -44,7 +44,7 @@ namespace log4net.Util /// </para> /// <para> /// All log4net internal debug calls go to the standard output stream - /// whereas internal error messages are sent to the standard error output + /// whereas internal error messages are sent to the standard error output /// stream. /// </para> /// </remarks> @@ -91,8 +91,8 @@ namespace log4net.Util /// A string indicating the severity of the internal message. /// </summary> /// <remarks> - /// "log4net: ", - /// "log4net:ERROR ", + /// "log4net: ", + /// "log4net:ERROR ", /// "log4net:WARN " /// </remarks> public string Prefix @@ -132,7 +132,7 @@ namespace log4net.Util #region Private Instance Constructors /// <summary> - /// Initializes a new instance of the <see cref="LogLog" /> class. + /// Initializes a new instance of the <see cref="LogLog" /> class. /// </summary> /// <param name="source"></param> /// <param name="prefix"></param> @@ -141,7 +141,7 @@ namespace log4net.Util public LogLog(Type source, string prefix, string message, Exception exception) { timeStampUtc = DateTime.UtcNow; - + this.source = source; this.prefix = prefix; this.message = message; @@ -153,7 +153,7 @@ namespace log4net.Util #region Static Constructor /// <summary> - /// Static constructor that initializes logging by reading + /// Static constructor that initializes logging by reading /// settings from the application configuration file. /// </summary> /// <remarks> @@ -164,7 +164,7 @@ namespace log4net.Util /// </para> /// <para> /// The <c>log4net.Internal.Quiet</c> application setting - /// suppresses all internal logging including error messages. + /// suppresses all internal logging including error messages. /// This setting should be set to <c>true</c> to enable message /// suppression. /// </para> @@ -198,16 +198,16 @@ namespace log4net.Util /// is enabled or disabled. /// </summary> /// <value> - /// <c>true</c> if log4net internal logging is enabled, otherwise + /// <c>true</c> if log4net internal logging is enabled, otherwise /// <c>false</c>. /// </value> /// <remarks> /// <para> - /// When set to <c>true</c>, internal debug level logging will be + /// When set to <c>true</c>, internal debug level logging will be /// displayed. /// </para> /// <para> - /// This value can be set by setting the application setting + /// This value can be set by setting the application setting /// <c>log4net.Internal.Debug</c> in the application configuration /// file. /// </para> @@ -218,7 +218,7 @@ namespace log4net.Util /// </remarks> /// <example> /// <para> - /// The following example enables internal debugging using the + /// The following example enables internal debugging using the /// application configuration file : /// </para> /// <code lang="XML" escaped="true"> @@ -237,17 +237,17 @@ namespace log4net.Util /// <summary> /// Gets or sets a value indicating whether log4net should generate no output - /// from internal logging, not even for errors. + /// from internal logging, not even for errors. /// </summary> /// <value> - /// <c>true</c> if log4net should generate no output at all from internal + /// <c>true</c> if log4net should generate no output at all from internal /// logging, otherwise <c>false</c>. /// </value> /// <remarks> /// <para> - /// When set to <c>true</c> will cause internal logging at all levels to be - /// suppressed. This means that no warning or error reports will be logged. - /// This option overrides the <see cref="InternalDebugging"/> setting and + /// When set to <c>true</c> will cause internal logging at all levels to be + /// suppressed. This means that no warning or error reports will be logged. + /// This option overrides the <see cref="InternalDebugging"/> setting and /// disables all debug also. /// </para> /// <para>This value can be set by setting the application setting @@ -259,7 +259,7 @@ namespace log4net.Util /// </para> /// </remarks> /// <example> - /// The following example disables internal logging using the + /// The following example disables internal logging using the /// application configuration file : /// <code lang="XML" escaped="true"> /// <configuration> @@ -276,7 +276,7 @@ namespace log4net.Util } /// <summary> - /// + /// /// </summary> public static bool EmitInternalMessages { @@ -320,20 +320,20 @@ namespace log4net.Util } /// <summary> - /// Writes log4net internal debug messages to the + /// Writes log4net internal debug messages to the /// standard output stream. /// </summary> /// <param name="source"></param> /// <param name="message">The message to log.</param> /// <remarks> /// <para> - /// All internal debug messages are prepended with + /// All internal debug messages are prepended with /// the string "log4net: ". /// </para> /// </remarks> - public static void Debug(Type source, string message) + public static void Debug(Type source, string message) { - if (IsDebugEnabled) + if (IsDebugEnabled) { if (EmitInternalMessages) { @@ -345,7 +345,7 @@ namespace log4net.Util } /// <summary> - /// Writes log4net internal debug messages to the + /// Writes log4net internal debug messages to the /// standard output stream. /// </summary> /// <param name="source">The Type that generated this message.</param> @@ -353,13 +353,13 @@ namespace log4net.Util /// <param name="exception">An exception to log.</param> /// <remarks> /// <para> - /// All internal debug messages are prepended with + /// All internal debug messages are prepended with /// the string "log4net: ". /// </para> /// </remarks> - public static void Debug(Type source, string message, Exception exception) + public static void Debug(Type source, string message, Exception exception) { - if (IsDebugEnabled) + if (IsDebugEnabled) { if (EmitInternalMessages) { @@ -373,7 +373,7 @@ namespace log4net.Util OnLogReceived(source, PREFIX, message, exception); } } - + /// <summary> /// Test if LogLog.Warn is enabled for output. /// </summary> @@ -391,18 +391,18 @@ namespace log4net.Util } /// <summary> - /// Writes log4net internal warning messages to the + /// Writes log4net internal warning messages to the /// standard error stream. /// </summary> /// <param name="source">The Type that generated this message.</param> /// <param name="message">The message to log.</param> /// <remarks> /// <para> - /// All internal warning messages are prepended with + /// All internal warning messages are prepended with /// the string "log4net:WARN ". /// </para> /// </remarks> - public static void Warn(Type source, string message) + public static void Warn(Type source, string message) { if (IsWarnEnabled) { @@ -413,10 +413,10 @@ namespace log4net.Util OnLogReceived(source, WARN_PREFIX, message, null); } - } + } /// <summary> - /// Writes log4net internal warning messages to the + /// Writes log4net internal warning messages to the /// standard error stream. /// </summary> /// <param name="source">The Type that generated this message.</param> @@ -424,11 +424,11 @@ namespace log4net.Util /// <param name="exception">An exception to log.</param> /// <remarks> /// <para> - /// All internal warning messages are prepended with + /// All internal warning messages are prepended with /// the string "log4net:WARN ". /// </para> /// </remarks> - public static void Warn(Type source, string message, Exception exception) + public static void Warn(Type source, string message, Exception exception) { if (IsWarnEnabled) { @@ -443,7 +443,7 @@ namespace log4net.Util OnLogReceived(source, WARN_PREFIX, message, exception); } - } + } /// <summary> /// Test if LogLog.Error is enabled for output. @@ -462,18 +462,18 @@ namespace log4net.Util } /// <summary> - /// Writes log4net internal error messages to the + /// Writes log4net internal error messages to the /// standard error stream. /// </summary> /// <param name="source">The Type that generated this message.</param> /// <param name="message">The message to log.</param> /// <remarks> /// <para> - /// All internal error messages are prepended with + /// All internal error messages are prepended with /// the string "log4net:ERROR ". /// </para> /// </remarks> - public static void Error(Type source, string message) + public static void Error(Type source, string message) { if (IsErrorEnabled) { @@ -484,10 +484,10 @@ namespace log4net.Util OnLogReceived(source, ERR_PREFIX, message, null); } - } + } /// <summary> - /// Writes log4net internal error messages to the + /// Writes log4net internal error messages to the /// standard error stream. /// </summary> /// <param name="source">The Type that generated this message.</param> @@ -495,11 +495,11 @@ namespace log4net.Util /// <param name="exception">An exception to log.</param> /// <remarks> /// <para> - /// All internal debug messages are prepended with + /// All internal debug messages are prepended with /// the string "log4net:ERROR ". /// </para> /// </remarks> - public static void Error(Type source, string message, Exception exception) + public static void Error(Type source, string message, Exception exception) { if (IsErrorEnabled) { @@ -514,12 +514,12 @@ namespace log4net.Util OnLogReceived(source, ERR_PREFIX, message, exception); } - } + } #endregion Public Static Methods /// <summary> - /// Writes output to the standard output stream. + /// Writes output to the standard output stream. /// </summary> /// <param name="message">The message to log.</param> /// <remarks> @@ -553,7 +553,7 @@ namespace log4net.Util } /// <summary> - /// Writes output to the standard error stream. + /// Writes output to the standard error stream. /// </summary> /// <param name="message">The message to log.</param> /// <remarks> @@ -616,7 +616,7 @@ namespace log4net.Util private readonly LogReceivedEventHandler handler; /// <summary> - /// + /// /// </summary> /// <param name="items"></param> public LogReceivedAdapter(IList items) @@ -634,7 +634,7 @@ namespace log4net.Util } /// <summary> - /// + /// /// </summary> public IList Items { @@ -642,7 +642,7 @@ namespace log4net.Util } /// <summary> - /// + /// /// </summary> public void Dispose() { @@ -652,14 +652,14 @@ namespace log4net.Util } /// <summary> - /// + /// /// </summary> public class LogReceivedEventArgs : EventArgs { private readonly LogLog loglog; /// <summary> - /// + /// /// </summary> /// <param name="loglog"></param> public LogReceivedEventArgs(LogLog loglog) @@ -668,7 +668,7 @@ namespace log4net.Util } /// <summary> - /// + /// /// </summary> public LogLog LogLog { http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/8a5b4204/src/Util/LogicalThreadContextProperties.cs ---------------------------------------------------------------------- diff --git a/src/Util/LogicalThreadContextProperties.cs b/src/Util/LogicalThreadContextProperties.cs index c5879fc..bc1ac20 100644 --- a/src/Util/LogicalThreadContextProperties.cs +++ b/src/Util/LogicalThreadContextProperties.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 @@ -49,7 +49,7 @@ namespace log4net.Util /// cref="System.Runtime.Remoting.Messaging.CallContext"/>. /// </para> /// <para> - /// The <see cref="CallContext"/> requires a link time + /// The <see cref="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. @@ -64,12 +64,12 @@ namespace log4net.Util #else private const string c_SlotName = "log4net.Util.LogicalThreadContextProperties"; #endif - + /// <summary> /// Flag used to disable this context if we don't have permission to access the CallContext. /// </summary> private bool m_disabled = false; - + #region Public Instance Constructors /// <summary> @@ -101,17 +101,17 @@ namespace log4net.Util /// </remarks> override public object this[string key] { - get - { + get + { // Don't create the dictionary if it does not already exist PropertiesDictionary dictionary = GetProperties(false); if (dictionary != null) { - return dictionary[key]; + return dictionary[key]; } return null; } - set + set { // Force the dictionary to be created PropertiesDictionary props = GetProperties(true); @@ -177,7 +177,7 @@ namespace log4net.Util /// <remarks> /// <para> /// The collection returned is only to be used on the calling thread. If the - /// caller needs to share the collection between different threads then the + /// caller needs to share the collection between different threads then the /// caller must clone the collection before doings so. /// </para> /// </remarks> @@ -198,12 +198,12 @@ namespace log4net.Util catch (SecurityException secEx) { m_disabled = true; - + // Thrown if we don't have permission to read or write the CallContext LogLog.Warn(declaringType, "SecurityException while accessing CallContext. Disabling LogicalThreadContextProperties", secEx); } } - + // Only get here is we are disabled because of a security exception if (create) { http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/8a5b4204/src/Util/LogicalThreadContextStack.cs ---------------------------------------------------------------------- diff --git a/src/Util/LogicalThreadContextStack.cs b/src/Util/LogicalThreadContextStack.cs index d251f75..9f00886 100644 --- a/src/Util/LogicalThreadContextStack.cs +++ b/src/Util/LogicalThreadContextStack.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 @@ -78,7 +78,7 @@ namespace log4net.Util /// </summary> /// <remarks> /// <para> - /// Initializes a new instance of the <see cref="LogicalThreadContextStack" /> class. + /// Initializes a new instance of the <see cref="LogicalThreadContextStack" /> class. /// </para> /// </remarks> #if NET_2_0 || MONO_2_0 @@ -128,7 +128,7 @@ namespace log4net.Util /// You do not need to use this method if you always guarantee to call /// the <see cref="IDisposable.Dispose"/> method of the <see cref="IDisposable"/> /// returned from <see cref="Push"/> even in exceptional circumstances, - /// for example by using the <c>using(log4net.LogicalThreadContext.Stacks["NDC"].Push("Stack_Message"))</c> + /// for example by using the <c>using(log4net.LogicalThreadContext.Stacks["NDC"].Push("Stack_Message"))</c> /// syntax. /// </para> /// </remarks> @@ -222,7 +222,7 @@ namespace log4net.Util /// <value>The internal storage stack</value> /// <remarks> /// <para> - /// This property is provided only to support backward compatability + /// This property is provided only to support backward compatability /// of the <see cref="NDC"/>. Tytpically the internal stack should not /// be modified. /// </para> http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/8a5b4204/src/Util/LogicalThreadContextStacks.cs ---------------------------------------------------------------------- diff --git a/src/Util/LogicalThreadContextStacks.cs b/src/Util/LogicalThreadContextStacks.cs index 3554cf3..28bcb29 100644 --- a/src/Util/LogicalThreadContextStacks.cs +++ b/src/Util/LogicalThreadContextStacks.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/Util/NativeError.cs ---------------------------------------------------------------------- diff --git a/src/Util/NativeError.cs b/src/Util/NativeError.cs index 1aeab0b..6fcaf7f 100644 --- a/src/Util/NativeError.cs +++ b/src/Util/NativeError.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 @@ -28,7 +28,7 @@ using System; using System.Globalization; using System.Runtime.InteropServices; -namespace log4net.Util +namespace log4net.Util { /// <summary> /// Represents a native error code and message. @@ -40,23 +40,23 @@ namespace log4net.Util /// </remarks> /// <author>Nicko Cadell</author> /// <author>Gert Driesen</author> - public sealed class NativeError + public sealed class NativeError { #region Protected Instance Constructors /// <summary> - /// Create an instance of the <see cref="NativeError" /> class with the specified + /// Create an instance of the <see cref="NativeError" /> class with the specified /// error number and message. /// </summary> /// <param name="number">The number of the native error.</param> /// <param name="message">The message of the native error.</param> /// <remarks> /// <para> - /// Create an instance of the <see cref="NativeError" /> class with the specified + /// Create an instance of the <see cref="NativeError" /> class with the specified /// error number and message. /// </para> /// </remarks> - private NativeError(int number, string message) + private NativeError(int number, string message) { m_number = number; m_message = message; @@ -77,7 +77,7 @@ namespace log4net.Util /// Gets the number of the native error. /// </para> /// </remarks> - public int Number + public int Number { get { return m_number; } } @@ -93,7 +93,7 @@ namespace log4net.Util /// </para> /// Gets the message of the native error. /// </remarks> - public string Message + public string Message { get { return m_message; } } @@ -110,7 +110,7 @@ namespace log4net.Util /// </returns> /// <remarks> /// <para> - /// The message for the <see cref="Marshal.GetLastWin32Error"/> error number is lookup up using the + /// The message for the <see cref="Marshal.GetLastWin32Error"/> error number is lookup up using the /// native Win32 <c>FormatMessage</c> function. /// </para> /// </remarks> @@ -119,7 +119,7 @@ namespace log4net.Util #elif !NETCF [System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand, UnmanagedCode=true)] #endif - public static NativeError GetLastError() + public static NativeError GetLastError() { int number = Marshal.GetLastWin32Error(); return new NativeError(number, NativeError.GetErrorMessage(number)); @@ -130,16 +130,16 @@ namespace log4net.Util /// </summary> /// <param name="number">the error number for the native error</param> /// <returns> - /// An instance of the <see cref="NativeError" /> class for the specified + /// An instance of the <see cref="NativeError" /> class for the specified /// error number. /// </returns> /// <remarks> /// <para> - /// The message for the specified error number is lookup up using the + /// The message for the specified error number is lookup up using the /// native Win32 <c>FormatMessage</c> function. /// </para> /// </remarks> - public static NativeError GetError(int number) + public static NativeError GetError(int number) { return new NativeError(number, NativeError.GetErrorMessage(number)); } @@ -162,7 +162,7 @@ namespace log4net.Util #elif !NETCF [System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand, UnmanagedCode = true)] #endif - public static string GetErrorMessage(int messageId) + public static string GetErrorMessage(int messageId) { // Win32 constants int FORMAT_MESSAGE_ALLOCATE_BUFFER = 0x00000100; // The function should allocates a buffer large enough to hold the formatted message @@ -173,30 +173,30 @@ namespace log4net.Util IntPtr sourcePtr = new IntPtr(); // Location of the message definition, will be ignored IntPtr argumentsPtr = new IntPtr(); // Pointer to array of values to insert, not supported as it requires unsafe code - if (messageId != 0) + if (messageId != 0) { // If the function succeeds, the return value is the number of TCHARs stored in the output buffer, excluding the terminating null character int messageSize = FormatMessage( - FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, - ref sourcePtr, - messageId, - 0, - ref msgBuf, - 255, + FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, + ref sourcePtr, + messageId, + 0, + ref msgBuf, + 255, argumentsPtr); - if (messageSize > 0) + if (messageSize > 0) { // Remove trailing null-terminating characters (\r\n) from the message msgBuf = msgBuf.TrimEnd(new char[] {'\r', '\n'}); } - else + else { // A message could not be located. msgBuf = null; } - } - else + } + else { msgBuf = null; } @@ -217,7 +217,7 @@ namespace log4net.Util /// Return error information string /// </para> /// </remarks> - public override string ToString() + public override string ToString() { return string.Format(CultureInfo.InvariantCulture, "0x{0:x8}", this.Number) + (this.Message != null ? ": " + this.Message : ""); } @@ -238,12 +238,12 @@ namespace log4net.Util /// <param name="Arguments">Pointer to an array of values that are used as insert values in the formatted message.</param> /// <remarks> /// <para> - /// The function requires a message definition as input. The message definition can come from a - /// buffer passed into the function. It can come from a message table resource in an - /// already-loaded module. Or the caller can ask the function to search the system's message - /// table resource(s) for the message definition. The function finds the message definition - /// in a message table resource based on a message identifier and a language identifier. - /// The function copies the formatted message text to an output buffer, processing any embedded + /// The function requires a message definition as input. The message definition can come from a + /// buffer passed into the function. It can come from a message table resource in an + /// already-loaded module. Or the caller can ask the function to search the system's message + /// table resource(s) for the message definition. The function finds the message definition + /// in a message table resource based on a message identifier and a language identifier. + /// The function copies the formatted message text to an output buffer, processing any embedded /// insert sequences if requested. /// </para> /// <para> @@ -252,11 +252,11 @@ namespace log4net.Util /// </remarks> /// <returns> /// <para> - /// If the function succeeds, the return value is the number of TCHARs stored in the output + /// If the function succeeds, the return value is the number of TCHARs stored in the output /// buffer, excluding the terminating null character. /// </para> /// <para> - /// If the function fails, the return value is zero. To get extended error information, + /// If the function fails, the return value is zero. To get extended error information, /// call <see cref="M:Marshal.GetLastWin32Error()" />. /// </para> /// </returns> @@ -266,11 +266,11 @@ namespace log4net.Util [DllImport("Kernel32.dll", SetLastError=true, CharSet=CharSet.Auto)] #endif private static extern int FormatMessage( - int dwFlags, - ref IntPtr lpSource, + int dwFlags, + ref IntPtr lpSource, int dwMessageId, - int dwLanguageId, - ref String lpBuffer, + int dwLanguageId, + ref String lpBuffer, int nSize, IntPtr Arguments); http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/8a5b4204/src/Util/NullDictionaryEnumerator.cs ---------------------------------------------------------------------- diff --git a/src/Util/NullDictionaryEnumerator.cs b/src/Util/NullDictionaryEnumerator.cs index e4564c8..98f6409 100644 --- a/src/Util/NullDictionaryEnumerator.cs +++ b/src/Util/NullDictionaryEnumerator.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 @@ -38,7 +38,7 @@ namespace log4net.Util #region Private Instance Constructors /// <summary> - /// Initializes a new instance of the <see cref="NullDictionaryEnumerator" /> class. + /// Initializes a new instance of the <see cref="NullDictionaryEnumerator" /> class. /// </summary> /// <remarks> /// <para> @@ -52,7 +52,7 @@ namespace log4net.Util #endregion Private Instance Constructors #region Public Static Properties - + /// <summary> /// Gets the singleton instance of the <see cref="NullDictionaryEnumerator" />. /// </summary> @@ -75,7 +75,7 @@ namespace log4net.Util /// Gets the current object from the enumerator. /// </summary> /// <remarks> - /// Throws an <see cref="InvalidOperationException" /> because the + /// Throws an <see cref="InvalidOperationException" /> because the /// <see cref="NullDictionaryEnumerator" /> never has a current value. /// </remarks> /// <remarks> @@ -85,13 +85,13 @@ namespace log4net.Util /// will throw an <see cref="InvalidOperationException"/>. /// </para> /// </remarks> - /// <exception cref="InvalidOperationException">The collection is empty and <see cref="Current"/> + /// <exception cref="InvalidOperationException">The collection is empty and <see cref="Current"/> /// cannot be positioned over a valid location.</exception> - public object Current + public object Current { get { throw new InvalidOperationException(); } } - + /// <summary> /// Test if the enumerator can advance, if so advance. /// </summary> @@ -107,7 +107,7 @@ namespace log4net.Util { return false; } - + /// <summary> /// Resets the enumerator back to the start. /// </summary> @@ -116,7 +116,7 @@ namespace log4net.Util /// As the enumerator is over an empty collection <see cref="Reset"/> does nothing. /// </para> /// </remarks> - public void Reset() + public void Reset() { } @@ -138,9 +138,9 @@ namespace log4net.Util /// will throw an <see cref="InvalidOperationException"/>. /// </para> /// </remarks> - /// <exception cref="InvalidOperationException">The collection is empty and <see cref="Current"/> + /// <exception cref="InvalidOperationException">The collection is empty and <see cref="Current"/> /// cannot be positioned over a valid location.</exception> - public object Key + public object Key { get { throw new InvalidOperationException(); } } @@ -150,7 +150,7 @@ namespace log4net.Util /// </summary> /// <value>The current value from the enumerator.</value> /// <remarks> - /// Throws an <see cref="InvalidOperationException" /> because the + /// Throws an <see cref="InvalidOperationException" /> because the /// <see cref="NullDictionaryEnumerator" /> never has a current value. /// </remarks> /// <remarks> @@ -160,9 +160,9 @@ namespace log4net.Util /// will throw an <see cref="InvalidOperationException"/>. /// </para> /// </remarks> - /// <exception cref="InvalidOperationException">The collection is empty and <see cref="Current"/> + /// <exception cref="InvalidOperationException">The collection is empty and <see cref="Current"/> /// cannot be positioned over a valid location.</exception> - public object Value + public object Value { get { throw new InvalidOperationException(); } } @@ -171,7 +171,7 @@ namespace log4net.Util /// Gets the current entry from the enumerator. /// </summary> /// <remarks> - /// Throws an <see cref="InvalidOperationException" /> because the + /// Throws an <see cref="InvalidOperationException" /> because the /// <see cref="NullDictionaryEnumerator" /> never has a current entry. /// </remarks> /// <remarks> @@ -181,13 +181,13 @@ namespace log4net.Util /// will throw an <see cref="InvalidOperationException"/>. /// </para> /// </remarks> - /// <exception cref="InvalidOperationException">The collection is empty and <see cref="Current"/> + /// <exception cref="InvalidOperationException">The collection is empty and <see cref="Current"/> /// cannot be positioned over a valid location.</exception> - public DictionaryEntry Entry + public DictionaryEntry Entry { get { throw new InvalidOperationException(); } } - + #endregion Implementation of IDictionaryEnumerator #region Private Static Fields @@ -196,7 +196,7 @@ namespace log4net.Util /// The singleton instance of the <see cref="NullDictionaryEnumerator" />. /// </summary> private readonly static NullDictionaryEnumerator s_instance = new NullDictionaryEnumerator(); - + #endregion Private Static Fields } } http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/8a5b4204/src/Util/NullEnumerator.cs ---------------------------------------------------------------------- diff --git a/src/Util/NullEnumerator.cs b/src/Util/NullEnumerator.cs index 614d616..6106ed3 100644 --- a/src/Util/NullEnumerator.cs +++ b/src/Util/NullEnumerator.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 @@ -38,7 +38,7 @@ namespace log4net.Util #region Private Instance Constructors /// <summary> - /// Initializes a new instance of the <see cref="NullEnumerator" /> class. + /// Initializes a new instance of the <see cref="NullEnumerator" /> class. /// </summary> /// <remarks> /// <para> @@ -50,7 +50,7 @@ namespace log4net.Util } #endregion Private Instance Constructors - + #region Public Static Properties /// <summary> @@ -75,7 +75,7 @@ namespace log4net.Util /// Gets the current object from the enumerator. /// </summary> /// <remarks> - /// Throws an <see cref="InvalidOperationException" /> because the + /// Throws an <see cref="InvalidOperationException" /> because the /// <see cref="NullDictionaryEnumerator" /> never has a current value. /// </remarks> /// <remarks> @@ -85,13 +85,13 @@ namespace log4net.Util /// will throw an <see cref="InvalidOperationException"/>. /// </para> /// </remarks> - /// <exception cref="InvalidOperationException">The collection is empty and <see cref="Current"/> + /// <exception cref="InvalidOperationException">The collection is empty and <see cref="Current"/> /// cannot be positioned over a valid location.</exception> - public object Current + public object Current { get { throw new InvalidOperationException(); } } - + /// <summary> /// Test if the enumerator can advance, if so advance /// </summary> @@ -107,7 +107,7 @@ namespace log4net.Util { return false; } - + /// <summary> /// Resets the enumerator back to the start. /// </summary> @@ -116,7 +116,7 @@ namespace log4net.Util /// As the enumerator is over an empty collection <see cref="Reset"/> does nothing. /// </para> /// </remarks> - public void Reset() + public void Reset() { } @@ -128,7 +128,7 @@ namespace log4net.Util /// The singleton instance of the <see cref="NullEnumerator" />. /// </summary> private readonly static NullEnumerator s_instance = new NullEnumerator(); - + #endregion Private Static Fields } } http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/8a5b4204/src/Util/NullSecurityContext.cs ---------------------------------------------------------------------- diff --git a/src/Util/NullSecurityContext.cs b/src/Util/NullSecurityContext.cs index 3196d1d..e4cc290 100644 --- a/src/Util/NullSecurityContext.cs +++ b/src/Util/NullSecurityContext.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/Util/OnlyOnceErrorHandler.cs ---------------------------------------------------------------------- diff --git a/src/Util/OnlyOnceErrorHandler.cs b/src/Util/OnlyOnceErrorHandler.cs index 8062962..6303669 100644 --- a/src/Util/OnlyOnceErrorHandler.cs +++ b/src/Util/OnlyOnceErrorHandler.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 @@ -24,8 +24,8 @@ using log4net.Core; namespace log4net.Util { /// <summary> - /// Implements log4net's default error handling policy which consists - /// of emitting a message for the first error in an appender and + /// Implements log4net's default error handling policy which consists + /// of emitting a message for the first error in an appender and /// ignoring all subsequent errors. /// </summary> /// <remarks> @@ -101,7 +101,7 @@ namespace log4net.Util /// Invokes <see cref="FirstError"/> if and only if this is the first error or the first error after <see cref="Reset"/> has been called. /// </para> /// </remarks> - public void Error(string message, Exception e, ErrorCode errorCode) + public void Error(string message, Exception e, ErrorCode errorCode) { if (m_firstTime) { @@ -142,7 +142,7 @@ namespace log4net.Util /// Invokes <see cref="FirstError"/> if and only if this is the first error or the first error after <see cref="Reset"/> has been called. /// </para> /// </remarks> - public void Error(string message, Exception e) + public void Error(string message, Exception e) { Error(message, e, ErrorCode.GenericFailure); } @@ -156,7 +156,7 @@ namespace log4net.Util /// Invokes <see cref="FirstError"/> if and only if this is the first error or the first error after <see cref="Reset"/> has been called. /// </para> /// </remarks> - public void Error(string message) + public void Error(string message) { Error(message, null, ErrorCode.GenericFailure); } @@ -186,10 +186,10 @@ namespace log4net.Util /// </summary> public DateTime EnabledDate { - get + get { if (m_enabledDateUtc == DateTime.MinValue) return DateTime.MinValue; - return m_enabledDateUtc.ToLocalTime(); + return m_enabledDateUtc.ToLocalTime(); } }
