You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-dev@logging.apache.org by ni...@apache.org on 2004/09/09 20:58:32 UTC

cvs commit: logging-log4net/src/Util GlobalContextProperties.cs PatternConverter.cs

nicko       2004/09/09 11:58:32

  Modified:    src/Util GlobalContextProperties.cs PatternConverter.cs
  Log:
  Minor code naming changes and doc comments
  
  Revision  Changes    Path
  1.3       +9 -0      logging-log4net/src/Util/GlobalContextProperties.cs
  
  Index: GlobalContextProperties.cs
  ===================================================================
  RCS file: /home/cvs/logging-log4net/src/Util/GlobalContextProperties.cs,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- GlobalContextProperties.cs	31 Jul 2004 14:41:06 -0000	1.2
  +++ GlobalContextProperties.cs	9 Sep 2004 18:58:32 -0000	1.3
  @@ -22,8 +22,17 @@
   namespace log4net.Util
   {
   	/// <summary>
  +	/// Implementation of Properties collection for the <see cref="log4net.GlobalContext"/>
   	/// </summary>
   	/// <remarks>
  +	/// <para>
  +	/// This class implements a properties collection that is thread safe and supports both
  +	/// storing properties and capturing a read only copy of the current propertied.
  +	/// </para>
  +	/// <para>
  +	/// This class is optimized to the scenario where the properties are read frequently
  +	/// and are modified infrequently.
  +	/// </para>
   	/// </remarks>
   	/// <author>Nicko Cadell</author>
   	public sealed class GlobalContextProperties
  
  
  
  1.4       +10 -10    logging-log4net/src/Util/PatternConverter.cs
  
  Index: PatternConverter.cs
  ===================================================================
  RCS file: /home/cvs/logging-log4net/src/Util/PatternConverter.cs,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PatternConverter.cs	23 Feb 2004 03:18:04 -0000	1.3
  +++ PatternConverter.cs	9 Sep 2004 18:58:32 -0000	1.4
  @@ -103,15 +103,15 @@
   		/// <summary>
   		/// Set the next pattern converter in the chains
   		/// </summary>
  -		/// <param name="pc">the pattern converter that should follow this converter in the chain</param>
  +		/// <param name="patternConverter">the pattern converter that should follow this converter in the chain</param>
   		/// <returns>the next converter</returns>
   		/// <remarks>
   		/// The PatternConverter can merge with its neighbor during this method (or a sub class).
   		/// Therefore the return value may or may not be the value of the argument passed in.
   		/// </remarks>
  -		public virtual PatternConverter SetNext(PatternConverter pc)
  +		public virtual PatternConverter SetNext(PatternConverter patternConverter)
   		{
  -			m_next = pc;
  +			m_next = patternConverter;
   			return m_next;
   		}
   
  @@ -133,29 +133,29 @@
   
   				Convert(m_formatWriter, state);
   
  -				StringBuilder sb = m_formatWriter.GetStringBuilder();
  -				int len = sb.Length;
  +				StringBuilder buf = m_formatWriter.GetStringBuilder();
  +				int len = buf.Length;
   
   				if (len > m_max)
   				{
  -					writer.Write(sb.ToString(len - m_max, m_max));
  +					writer.Write(buf.ToString(len - m_max, m_max));
   				}
   				else if (len < m_min) 
   				{
   					if (m_leftAlign) 
   					{	
  -						writer.Write(sb.ToString());
  +						writer.Write(buf.ToString());
   						SpacePad(writer, m_min - len);
   					}
   					else 
   					{
   						SpacePad(writer, m_min - len);
  -						writer.Write(sb.ToString());
  +						writer.Write(buf.ToString());
   					}
   				}
   				else
   				{
  -					writer.Write(sb.ToString());
  +					writer.Write(buf.ToString());
   				}
   			}
   		}	
  @@ -245,7 +245,7 @@
   
   			bool first = true;
   
  -			// Write out all the MDC key value pairs
  +			// Write out all the dictionary key value pairs
   			foreach(DictionaryEntry entry in value)
   			{
   				if (first)