nicko       2005/03/13 18:44:57

  Modified:    src/Layout ILayout.cs LayoutSkeleton.cs
  Log:
  Removed obsolete Format method from ILayout and LayoutSkeleton. It was 
already a breaking change, best to remove the old method before the next 
release, i.e. so we don't have to break it again.
  
  Revision  Changes    Path
  1.5       +12 -16    logging-log4net/src/Layout/ILayout.cs
  
  Index: ILayout.cs
  ===================================================================
  RCS file: /home/cvs/logging-log4net/src/Layout/ILayout.cs,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ILayout.cs        17 Jan 2005 20:18:45 -0000      1.4
  +++ ILayout.cs        14 Mar 2005 02:44:57 -0000      1.5
  @@ -30,7 +30,7 @@
        /// <remarks>
        /// <para>
        /// An <see cref="ILayout"/> object is used to format a <see 
cref="LoggingEvent"/>
  -     /// as text. The <see cref="Format(LoggingEvent)"/> method is called by 
an
  +     /// as text. The <see cref="Format(TextWriter,LoggingEvent)"/> method 
is called by an
        /// appender to transform the <see cref="LoggingEvent"/> into a string.
        /// </para>
        /// <para>
  @@ -45,27 +45,23 @@
                /// <summary>
                /// Implement this method to create your own layout format.
                /// </summary>
  -             /// <param name="loggingEvent">The event to format</param>
  -             /// <returns>returns the formatted event</returns>
  -             /// <remarks>
  -             /// <para>
  -             /// This method is called by an appender to format
  -             /// the <paramref name="loggingEvent"/> as a string.
  -             /// </para>
  -             /// </remarks>
  -             [Obsolete("Use Format(TextWriter,LoggingEvent)")]
  -             string Format(LoggingEvent loggingEvent);
  -
  -             /// <summary>
  -             /// Implement this method to create your own layout format.
  -             /// </summary>
                /// <param name="writer">The TextWriter to write the formatted 
event to</param>
                /// <param name="loggingEvent">The event to format</param>
                /// <remarks>
                /// <para>
                /// This method is called by an appender to format
  -             /// the <paramref name="loggingEvent"/> as text.
  +             /// the <paramref name="loggingEvent"/> as text and output to a 
writer.
                /// </para>
  +             /// <para>
  +             /// If the caller does not have a <see cref="TextWriter"/> and 
prefers the
  +             /// event to be formatted as a <see cref="String"/> then the 
following
  +             /// code can be used to format the event into a <see 
cref="StringWriter"/>.
  +             /// </para>
  +             /// <code lang="C#">
  +             /// StringWriter writer = new StringWriter();
  +             /// Layout.Format(writer, loggingEvent);
  +             /// string formattedEvent = writer.ToString();
  +             /// </code>
                /// </remarks>
                void Format(TextWriter writer, LoggingEvent loggingEvent);
   
  
  
  
  1.8       +0 -22     logging-log4net/src/Layout/LayoutSkeleton.cs
  
  Index: LayoutSkeleton.cs
  ===================================================================
  RCS file: /home/cvs/logging-log4net/src/Layout/LayoutSkeleton.cs,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- LayoutSkeleton.cs 17 Jan 2005 20:18:45 -0000      1.7
  +++ LayoutSkeleton.cs 14 Mar 2005 02:44:57 -0000      1.8
  @@ -129,28 +129,6 @@
                /// <summary>
                /// Implement this method to create your own layout format.
                /// </summary>
  -             /// <param name="loggingEvent">The event to format</param>
  -             /// <returns>returns the formatted event</returns>
  -             /// <remarks>
  -             /// <para>
  -             /// This method is called by an appender to format
  -             /// the <paramref name="loggingEvent"/> as a string.
  -             /// </para>
  -             /// <para>
  -             /// This method must be implemented by the subclass.
  -             /// </para>
  -             /// </remarks>
  -             [Obsolete("Use Format(TextWriter,LoggingEvent)")]
  -             public string Format(LoggingEvent loggingEvent)
  -             {
  -                     StringWriter writer = new 
StringWriter(System.Globalization.CultureInfo.InvariantCulture);
  -                     this.Format(writer, loggingEvent);
  -                     return writer.ToString();
  -             }
  -
  -             /// <summary>
  -             /// Implement this method to create your own layout format.
  -             /// </summary>
                /// <param name="writer">The TextWriter to write the formatted 
event to</param>
                /// <param name="loggingEvent">The event to format</param>
                /// <remarks>
  
  
  

Reply via email to