nicko       2004/06/01 10:55:46

  Modified:    src/Util PatternString.cs
  Log:
  Updated PatternString not to implement the IOptionHandler interface
  
  Revision  Changes    Path
  1.5       +7 -34     logging-log4net/src/Util/PatternString.cs
  
  Index: PatternString.cs
  ===================================================================
  RCS file: /home/cvs/logging-log4net/src/Util/PatternString.cs,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- PatternString.cs  30 May 2004 10:48:26 -0000      1.4
  +++ PatternString.cs  1 Jun 2004 17:55:46 -0000       1.5
  @@ -40,7 +40,7 @@
        /// of the process in general.</para>
        /// </remarks>
        /// <author>Nicko Cadell</author>
  -     public class PatternString : IOptionHandler
  +     public class PatternString
        {
                #region Static Fields
   
  @@ -72,7 +72,7 @@
                /// </summary>
                static PatternString()
                {
  -                     s_globalRulesRegistry = new Hashtable(35);
  +                     s_globalRulesRegistry = new Hashtable(10);
   
                        s_globalRulesRegistry.Add("appdomain", 
typeof(AppDomainPatternConverter));
                        s_globalRulesRegistry.Add("date", 
typeof(DatePatternConverter));
  @@ -98,13 +98,12 @@
                }
   
                /// <summary>
  -             /// Constructs a PatternString using the supplied conversion 
pattern
  +             /// Constructs a PatternString
                /// </summary>
  -             /// <param name="pattern">the pattern to use</param>
  -             public PatternString(string pattern) 
  +             /// <param name="pattern">The pattern to use with this 
PatternString</param>
  +             public PatternString(string pattern)
                {
  -                     m_pattern = pattern;
  -                     m_head = CreatePatternParser((pattern == null) ? "" : 
pattern).Parse();
  +                     ConversionPattern = pattern;
                }
   
                #endregion
  @@ -131,7 +130,7 @@
                /// </summary>
                /// <param name="pattern">the pattern to parse</param>
                /// <returns></returns>
  -             virtual protected PatternParser CreatePatternParser(string 
pattern) 
  +             private PatternParser CreatePatternParser(string pattern) 
                {
                        PatternParser patternParser = new 
PatternParser(pattern);
   
  @@ -144,31 +143,6 @@
                        return patternParser;
                }
     
  -             #region Implementation of IOptionHandler
  -
  -             /// <summary>
  -             /// Initialize component options
  -             /// </summary>
  -             /// <remarks>
  -             /// <para>
  -             /// This is part of the <see cref="IOptionHandler"/> delayed 
object
  -             /// 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. 
  -             /// </para>
  -             /// <para>
  -             /// If any of the configuration properties are modified then 
  -             /// <see cref="ActivateOptions"/> must be called again.
  -             /// </para>
  -             /// </remarks>
  -             virtual public void ActivateOptions() 
  -             {
  -                     // nothing to do.
  -             }
  -
  -             #endregion
  -
                /// <summary>
                /// Produces a formatted string as specified by the conversion 
pattern.
                /// </summary>
  @@ -195,6 +169,5 @@
                        Format(writer);
                        return writer.ToString();
                }
  -
        }
   }
  
  
  

Reply via email to