nicko 2004/12/05 18:26:04
Modified: src GlobalContext.cs ILog.cs LogManager.cs NDC.cs
src/ObjectRenderer DefaultRenderer.cs IObjectRenderer.cs
RendererMap.cs
src/Plugin PluginCollection.cs
src/Util LogLog.cs OptionConverter.cs ThreadContextStack.cs
Log:
Updated doc comments
Revision Changes Path
1.5 +1 -1 logging-log4net/src/GlobalContext.cs
Index: GlobalContext.cs
===================================================================
RCS file: /home/cvs/logging-log4net/src/GlobalContext.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- GlobalContext.cs 22 Nov 2004 02:09:06 -0000 1.4
+++ GlobalContext.cs 6 Dec 2004 02:26:03 -0000 1.5
@@ -42,7 +42,7 @@
/// </para>
/// </remarks>
/// <example>
- /// <code>
+ /// <code lang="C#">
/// GlobalContext.Properties["hostname"] = Environment.MachineName;
/// </code>
/// </example>
1.8 +5 -5 logging-log4net/src/ILog.cs
Index: ILog.cs
===================================================================
RCS file: /home/cvs/logging-log4net/src/ILog.cs,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- ILog.cs 22 Nov 2004 02:09:06 -0000 1.7
+++ ILog.cs 6 Dec 2004 02:26:03 -0000 1.8
@@ -45,7 +45,7 @@
/// </para>
/// </remarks>
/// <example>Simple example of logging messages
- /// <code>
+ /// <code lang="C#">
/// ILog log = LogManager.GetLogger("application-log");
///
/// log.Info("Application Start");
@@ -500,7 +500,7 @@
/// disabled log debug statements.
/// </para>
/// <para> For some ILog interface <c>log</c>, when you
write:</para>
- /// <code>
+ /// <code lang="C#">
/// log.Debug("This is entry number: " + i );
/// </code>
/// <para>
@@ -510,7 +510,7 @@
/// <para>
/// If you are worried about speed (who isn't), then you should
write:
/// </para>
- /// <code>
+ /// <code lang="C#">
/// if (log.IsDebugEnabled)
/// {
/// log.Debug("This is entry number: " + i );
@@ -529,13 +529,13 @@
/// <para>Alternatively if your logger is available statically
then the is debug
/// enabled state can be stored in a static variable like this:
/// </para>
- /// <code>
+ /// <code lang="C#">
/// private static readonly bool isDebugEnabled =
log.IsDebugEnabled;
/// </code>
/// <para>
/// Then when you come to log you can write:
/// </para>
- /// <code>
+ /// <code lang="C#">
/// if (isDebugEnabled)
/// {
/// log.Debug("This is entry number: " + i );
1.8 +1 -1 logging-log4net/src/LogManager.cs
Index: LogManager.cs
===================================================================
RCS file: /home/cvs/logging-log4net/src/LogManager.cs,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- LogManager.cs 22 Nov 2004 02:09:06 -0000 1.7
+++ LogManager.cs 6 Dec 2004 02:26:03 -0000 1.8
@@ -38,7 +38,7 @@
/// </para>
/// </remarks>
/// <example>Simple example of logging messages
- /// <code>
+ /// <code lang="C#">
/// ILog log = LogManager.GetLogger("application-log");
///
/// log.Info("Application Start");
1.11 +1 -1 logging-log4net/src/NDC.cs
Index: NDC.cs
===================================================================
RCS file: /home/cvs/logging-log4net/src/NDC.cs,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- NDC.cs 24 Nov 2004 15:53:29 -0000 1.10
+++ NDC.cs 6 Dec 2004 02:26:03 -0000 1.11
@@ -180,7 +180,7 @@
/// context.
/// </remarks>
/// <example>Simple example of using the <c>Push</c> method
with the <c>using</c> keyword.
- /// <code>
+ /// <code lang="C#">
/// using(log4net.NDC.Push("NDC_Message"))
/// {
/// log.Warn("This should have an NDC message");
1.7 +5 -4 logging-log4net/src/ObjectRenderer/DefaultRenderer.cs
Index: DefaultRenderer.cs
===================================================================
RCS file: /home/cvs/logging-log4net/src/ObjectRenderer/DefaultRenderer.cs,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- DefaultRenderer.cs 17 Nov 2004 21:50:18 -0000 1.6
+++ DefaultRenderer.cs 6 Dec 2004 02:26:04 -0000 1.7
@@ -48,7 +48,9 @@
/// Default constructor
/// </summary>
/// <remarks>
+ /// <para>
/// Default constructor
+ /// </para>
/// </remarks>
public DefaultRenderer()
{
@@ -68,7 +70,6 @@
/// <para>
/// Render the object <paramref name="obj"/> to a string.
/// </para>
- ///
/// <para>
/// The <paramref name="rendererMap"/> parameter is
/// provided to lookup and render other objects. This is
@@ -76,9 +77,9 @@
/// nested objects of unknown type. The <see
cref="RendererMap.FindAndRender"/>
/// method can be used to render these objects.
/// </para>
- ///
- /// <para>The default renderer supports rendering objects to
strings as follows:</para>
- ///
+ /// <para>
+ /// The default renderer supports rendering objects to strings
as follows:
+ /// </para>
/// <list type="table">
/// <listheader>
/// <term>Value</term>
1.3 +12 -7 logging-log4net/src/ObjectRenderer/IObjectRenderer.cs
Index: IObjectRenderer.cs
===================================================================
RCS file: /home/cvs/logging-log4net/src/ObjectRenderer/IObjectRenderer.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- IObjectRenderer.cs 16 Feb 2004 02:10:54 -0000 1.2
+++ IObjectRenderer.cs 6 Dec 2004 02:26:04 -0000 1.3
@@ -25,10 +25,12 @@
/// Implement this interface in order to render objects as strings
/// </summary>
/// <remarks>
- /// <para>Certain types require special case conversion to
+ /// <para>
+ /// Certain types require special case conversion to
/// string form. This conversion is done by an object renderer.
/// Object renderers implement the <see cref="IObjectRenderer"/>
- /// interface.</para>
+ /// interface.
+ /// </para>
/// </remarks>
/// <author>Nicko Cadell</author>
/// <author>Gert Driesen</author>
@@ -41,14 +43,17 @@
/// <param name="obj">The object to render</param>
/// <param name="writer">The writer to render to</param>
/// <remarks>
- /// <para>Render the object <paramref name="obj"/> to a
- /// string.</para>
- ///
- /// <para>The <paramref name="rendererMap"/> parameter is
+ /// <para>
+ /// Render the object <paramref name="obj"/> to a
+ /// string.
+ /// </para>
+ /// <para>
+ /// The <paramref name="rendererMap"/> parameter is
/// provided to lookup and render other objects. This is
/// very useful where <paramref name="obj"/> contains
/// nested objects of unknown type. The <see
cref="RendererMap.FindAndRender"/>
- /// method can be used to render these objects.</para>
+ /// method can be used to render these objects.
+ /// </para>
/// </remarks>
void RenderObject(RendererMap rendererMap, object obj,
TextWriter writer);
}
1.6 +59 -12 logging-log4net/src/ObjectRenderer/RendererMap.cs
Index: RendererMap.cs
===================================================================
RCS file: /home/cvs/logging-log4net/src/ObjectRenderer/RendererMap.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- RendererMap.cs 1 Oct 2004 20:58:48 -0000 1.5
+++ RendererMap.cs 6 Dec 2004 02:26:04 -0000 1.6
@@ -24,6 +24,17 @@
/// <summary>
/// Map class objects to an <see cref="IObjectRenderer"/>.
/// </summary>
+ /// <remarks>
+ /// <para>
+ /// Maintains a mapping between types that require special
+ /// rendering and the <see cref="IObjectRenderer"/> that
+ /// is used to render them.
+ /// </para>
+ /// <para>
+ /// The <see cref="FindAndRender"/> method is used to render an
+ /// <c>object</c> using the appropriate renderers defined in this map.
+ /// </para>
+ /// </remarks>
/// <author>Nicko Cadell</author>
/// <author>Gert Driesen</author>
public class RendererMap
@@ -38,8 +49,13 @@
#region Constructors
/// <summary>
- /// Constructor
+ /// Default Constructor
/// </summary>
+ /// <remarks>
+ /// <para>
+ /// Default constructor.
+ /// </para>
+ /// </remarks>
public RendererMap()
{
m_map = System.Collections.Hashtable.Synchronized(new
System.Collections.Hashtable());
@@ -69,15 +85,17 @@
/// <summary>
/// Render <paramref name="obj"/> using the appropriate
renderer.
/// </summary>
+ /// <param name="obj">the object to render to a string</param>
+ /// <param name="writer">The writer to render to</param>
/// <remarks>
- /// <para>Find the appropriate renderer for the type of the
+ /// <para>
+ /// Find the appropriate renderer for the type of the
/// <paramref name="obj"/> parameter. This is accomplished by
calling the
/// <see cref="Get(Type)"/> method. Once a renderer is found,
it is
/// applied on the object <paramref name="obj"/> and the result
is returned
- /// as a <see cref="string"/>.</para>
+ /// as a <see cref="string"/>.
+ /// </para>
/// </remarks>
- /// <param name="obj">the object to render to a string</param>
- /// <param name="writer">The writer to render to</param>
public void FindAndRender(object obj, TextWriter writer)
{
if (obj == null)
@@ -126,14 +144,17 @@
/// <summary>
/// Gets the renderer for the specified object type
/// </summary>
- /// <remarks>
- /// <param>Gets the renderer for the specified object
type</param>
- ///
- /// <param>Syntactic sugar method that calls <see
cref="Get(Type)"/>
- /// with the type of the object parameter.</param>
- /// </remarks>
/// <param name="obj">the object to lookup the renderer
for</param>
/// <returns>the renderer for <paramref name="obj"/></returns>
+ /// <remarks>
+ /// <param>
+ /// Gets the renderer for the specified object type.
+ /// </param>
+ /// <param>
+ /// Syntactic sugar method that calls <see cref="Get(Type)"/>
+ /// with the type of the object parameter.
+ /// </param>
+ /// </remarks>
public IObjectRenderer Get(Object obj)
{
if (obj == null)
@@ -151,6 +172,13 @@
/// </summary>
/// <param name="type">the type to lookup the renderer
for</param>
/// <returns>the renderer for the specified type</returns>
+ /// <remarks>
+ /// <para>
+ /// Returns the renderer for the specified type.
+ /// If no specific renderer has been defined the
+ /// <see cref="DefaultRenderer"/> will be returned.
+ /// </para>
+ /// </remarks>
public IObjectRenderer Get(Type type)
{
if (type == null)
@@ -215,7 +243,12 @@
/// <summary>
/// Get the default renderer instance
/// </summary>
- /// <returns>the default renderer</returns>
+ /// <value>the default renderer</value>
+ /// <remarks>
+ /// <para>
+ /// Get the default renderer
+ /// </para>
+ /// </remarks>
public IObjectRenderer DefaultRenderer
{
get { return s_defaultRenderer; }
@@ -224,6 +257,13 @@
/// <summary>
/// Clear the map of renderers
/// </summary>
+ /// <remarks>
+ /// <para>
+ /// Clear the custom renderers defined by using
+ /// <see cref="Put"/>. The <see cref="DefaultRenderer"/>
+ /// cannot be removed.
+ /// </para>
+ /// </remarks>
public void Clear()
{
m_map.Clear();
@@ -234,6 +274,13 @@
/// </summary>
/// <param name="typeToRender">the type that will be rendered
by <paramref name="renderer"/></param>
/// <param name="renderer">the renderer for <paramref
name="typeToRender"/></param>
+ /// <remarks>
+ /// <para>
+ /// Register an object renderer for a specific source type.
+ /// This renderer will be returned from a call to <see
cref="Get"/>
+ /// specifying the same <paramref name="typeToRender"/> as an
argument.
+ /// </para>
+ /// </remarks>
public void Put(Type typeToRender, IObjectRenderer renderer)
{
if (typeToRender == null)
1.7 +6 -6 logging-log4net/src/Plugin/PluginCollection.cs
Index: PluginCollection.cs
===================================================================
RCS file: /home/cvs/logging-log4net/src/Plugin/PluginCollection.cs,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- PluginCollection.cs 7 Jun 2004 01:02:39 -0000 1.6
+++ PluginCollection.cs 6 Dec 2004 02:26:04 -0000 1.7
@@ -46,13 +46,13 @@
/// <summary>
/// Advances the enumerator to the next element in
the collection.
/// </summary>
- /// <exception cref="InvalidOperationException">
- /// The collection was modified after the
enumerator was created.
- /// </exception>
/// <returns>
/// <c>true</c> if the enumerator was successfully
advanced to the next element;
/// <c>false</c> if the enumerator has passed the
end of the collection.
/// </returns>
+ /// <exception cref="InvalidOperationException">
+ /// The collection was modified after the
enumerator was created.
+ /// </exception>
bool MoveNext();
/// <summary>
@@ -709,13 +709,13 @@
/// <summary>
/// Advances the enumerator to the next element in the
collection.
/// </summary>
- /// <exception cref="InvalidOperationException">
- /// The collection was modified after the enumerator
was created.
- /// </exception>
/// <returns>
/// <c>true</c> if the enumerator was successfully
advanced to the next element;
/// <c>false</c> if the enumerator has passed the end
of the collection.
/// </returns>
+ /// <exception cref="InvalidOperationException">
+ /// The collection was modified after the enumerator
was created.
+ /// </exception>
public bool MoveNext()
{
if (m_version != m_collection.m_version)
1.4 +12 -12 logging-log4net/src/Util/LogLog.cs
Index: LogLog.cs
===================================================================
RCS file: /home/cvs/logging-log4net/src/Util/LogLog.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- LogLog.cs 22 Nov 2004 22:39:39 -0000 1.3
+++ LogLog.cs 6 Dec 2004 02:26:04 -0000 1.4
@@ -125,12 +125,12 @@
/// The following example enables internal debugging using the
/// application configuration file :
/// </para>
- /// <code>
- /// <configuration>
- /// <appSettings>
- /// <add key="log4net.Internal.Debug"
value="true" />
- /// </appSettings>
- /// </configuration>
+ /// <code lang="XML" escaped="true">
+ /// <configuration>
+ /// <appSettings>
+ /// <add key="log4net.Internal.Debug"
value="true" />
+ /// </appSettings>
+ /// </configuration>
/// </code>
/// </example>
public static bool InternalDebugging
@@ -165,12 +165,12 @@
/// <example>
/// The following example disables internal logging using the
/// application configuration file :
- /// <code>
- /// <configuration>
- /// <appSettings>
- /// <add key="log4net.Internal.Quiet"
value="true" />
- /// </appSettings>
- /// </configuration>
+ /// <code lang="XML" escaped="true">
+ /// <configuration>
+ /// <appSettings>
+ /// <add key="log4net.Internal.Quiet"
value="true" />
+ /// </appSettings>
+ /// </configuration>
/// </code>
/// </example>
public static bool QuietMode
1.9 +9 -9 logging-log4net/src/Util/OptionConverter.cs
Index: OptionConverter.cs
===================================================================
RCS file: /home/cvs/logging-log4net/src/Util/OptionConverter.cs,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- OptionConverter.cs 1 Oct 2004 21:02:16 -0000 1.8
+++ OptionConverter.cs 6 Dec 2004 02:26:04 -0000 1.9
@@ -469,15 +469,15 @@
/// The variable substitution delimiters are <b>${</b> and
<b>}</b>.
/// </para>
/// <para>
- /// For example, if props contains "key=value", then
the call
+ /// For example, if props contains <c>key=value</c>, then the
call
/// </para>
/// <para>
- /// <code>
- /// string s = OptionConverter.substituteVars("Value of key is
${key}.");
+ /// <code lang="C#">
+ /// string s = OptionConverter.SubstituteVariables("Value of
key is ${key}.");
/// </code>
/// </para>
/// <para>
- /// will set the variable <c>s</c> to "Value of key is
value.".
+ /// will set the variable <c>s</c> to "Value of key is value.".
/// </para>
/// <para>
/// If no value could be found for the specified key, then
substitution
@@ -485,19 +485,19 @@
/// </para>
/// <para>
/// For example, if system properties contains no value for the
key
- /// "nonExistentKey", then the call
+ /// "nonExistentKey", then the call
/// </para>
/// <para>
- /// <code>
- /// string s = OptionConverter.subsVars("Value of
nonExistentKey is [${nonExistentKey}]");
+ /// <code lang="C#">
+ /// string s = OptionConverter.SubstituteVariables("Value of
nonExistentKey is [${nonExistentKey}]");
/// </code>
/// </para>
/// <para>
- /// will set <s>s</s> to "Value of nonExistentKey is
[]".
+ /// will set <s>s</s> to "Value of nonExistentKey is []".
/// </para>
/// <para>
/// An Exception is thrown if <paramref name="value"/> contains
a start
- /// delimiter "${" which is not balanced by a stop
delimiter "}".
+ /// delimiter "${" which is not balanced by a stop delimiter
"}".
/// </para>
/// </remarks>
/// <returns>The result of the substitutions.</returns>
1.3 +1 -1 logging-log4net/src/Util/ThreadContextStack.cs
Index: ThreadContextStack.cs
===================================================================
RCS file: /home/cvs/logging-log4net/src/Util/ThreadContextStack.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ThreadContextStack.cs 24 Nov 2004 15:53:30 -0000 1.2
+++ ThreadContextStack.cs 6 Dec 2004 02:26:04 -0000 1.3
@@ -114,7 +114,7 @@
/// context.
/// </remarks>
/// <example>Simple example of using the <c>Push</c> method
with the <c>using</c> keyword.
- /// <code>
+ /// <code lang="C#">
///
using(log4net.ThreadContext.Stacks["NDC"].Push("Stack_Message"))
/// {
/// log.Warn("This should have an ThreadContext
Stack message");