nicko 2005/08/25 03:54:20
Modified: src/Layout XMLLayout.cs
src/Util Transform.cs
Log:
Fixed doc comments
Revision Changes Path
1.12 +4 -4 logging-log4net/src/Layout/XMLLayout.cs
Index: XMLLayout.cs
===================================================================
RCS file: /home/cvs/logging-log4net/src/Layout/XMLLayout.cs,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- XMLLayout.cs 24 Aug 2005 13:26:37 -0000 1.11
+++ XMLLayout.cs 25 Aug 2005 10:54:20 -0000 1.12
@@ -131,7 +131,7 @@
/// output. This can cause problems when the message contains
binary
/// data. By setting this to true the contents of the message
will be
/// base64 encoded. If this is set then invalid character
replacement
- /// (see <see cref="InvalidCharReplacement"/>) will not be
performed
+ /// (see <see cref="XmlLayoutBase.InvalidCharReplacement"/>)
will not be performed
/// on the log message.
/// </para>
/// </remarks>
@@ -150,7 +150,7 @@
/// output. This can cause problems when one or more properties
contain
/// binary data. By setting this to true the values of the
properties
/// will be base64 encoded. If this is set then invalid
character replacement
- /// (see <see cref="InvalidCharReplacement"/>) will not be
performed
+ /// (see <see cref="XmlLayoutBase.InvalidCharReplacement"/>)
will not be performed
/// on the property values.
/// </para>
/// </remarks>
@@ -259,13 +259,13 @@
foreach(System.Collections.DictionaryEntry
entry in properties)
{
writer.WriteStartElement(m_elmData);
- writer.WriteAttributeString(ATTR_NAME,
Transform.MaskXMLInvalidCharacters((string)entry.Key,this.InvalidCharReplacement));
+ writer.WriteAttributeString(ATTR_NAME,
Transform.MaskXmlInvalidCharacters((string)entry.Key,this.InvalidCharReplacement));
// Use an ObjectRenderer to convert the
object to a string
string valueStr =null;
if (!this.Base64EncodeProperties)
{
-
valueStr=Transform.MaskXMLInvalidCharacters(loggingEvent.Repository.RendererMap.FindAndRender(entry.Value),this.InvalidCharReplacement);
+
valueStr=Transform.MaskXmlInvalidCharacters(loggingEvent.Repository.RendererMap.FindAndRender(entry.Value),this.InvalidCharReplacement);
}
else
{
1.8 +19 -3 logging-log4net/src/Util/Transform.cs
Index: Transform.cs
===================================================================
RCS file: /home/cvs/logging-log4net/src/Util/Transform.cs,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Transform.cs 24 Aug 2005 13:26:37 -0000 1.7
+++ Transform.cs 25 Aug 2005 10:54:20 -0000 1.8
@@ -67,7 +67,7 @@
/// </remarks>
public static void WriteEscapedXmlString(XmlWriter writer,
string textData, string invalidCharReplacement)
{
- string
stringData=MaskXMLInvalidCharacters(textData,invalidCharReplacement);
+ string stringData = MaskXmlInvalidCharacters(textData,
invalidCharReplacement);
// Write either escaped text or CDATA sections
int weightCData = 12 * (1 + CountSubstrings(stringData,
CDATA_END));
@@ -116,9 +116,25 @@
}
}
- public static string MaskXMLInvalidCharacters(string
textData,string mask)
+ /// <summary>
+ /// Replace invalid XML characters in text string
+ /// </summary>
+ /// <param name="textData">the XML text input string</param>
+ /// <param name="mask">the string to use in place of invalid
characters</param>
+ /// <returns>A string that does not contain invalid XML
characters.</returns>
+ /// <remarks>
+ /// <para>
+ /// Certain Unicode code points are not allowed in the XML
InfoSet, for
+ /// details see: <a
href="http://www.w3.org/TR/REC-xml/#charsets">http://www.w3.org/TR/REC-xml/#charsets</a>.
+ /// </para>
+ /// <para>
+ /// This method replaces any illegal characters in the input
string
+ /// with the mask string specified.
+ /// </para>
+ /// </remarks>
+ public static string MaskXmlInvalidCharacters(string textData,
string mask)
{
- return INVALIDCHARS.Replace(textData,mask);
+ return INVALIDCHARS.Replace(textData, mask);
}
#endregion Public Static Methods