nicko       2004/09/10 11:54:14

  Modified:    src/Repository/Hierarchy XmlHierarchyConfigurator.cs
               src/Util OptionConverter.cs
  Log:
  Removed OptionConverter.ConvertSpecialChars. This was used to parse C
  style string escaped chars. XML has a different but well defined and
  understood char escaping scheme which is preferred for XML data. This
  means that backslashes will no longer need to be escaped.
  
  Revision  Changes    Path
  1.10      +0 -3      
logging-log4net/src/Repository/Hierarchy/XmlHierarchyConfigurator.cs
  
  Index: XmlHierarchyConfigurator.cs
  ===================================================================
  RCS file: 
/home/cvs/logging-log4net/src/Repository/Hierarchy/XmlHierarchyConfigurator.cs,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- XmlHierarchyConfigurator.cs       9 Sep 2004 18:56:53 -0000       1.9
  +++ XmlHierarchyConfigurator.cs       10 Sep 2004 18:54:14 -0000      1.10
  @@ -535,9 +535,6 @@
                                {
                                        string propertyValue = 
element.GetAttribute(VALUE_ATTR);
   
  -                                     // Fixup embedded non-printable chars
  -                                     propertyValue = 
OptionConverter.ConvertSpecialChars(propertyValue);
  -
   #if !NETCF   
                                        try
                                        {
  
  
  
  1.7       +35 -35    logging-log4net/src/Util/OptionConverter.cs
  
  Index: OptionConverter.cs
  ===================================================================
  RCS file: /home/cvs/logging-log4net/src/Util/OptionConverter.cs,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- OptionConverter.cs        7 Jun 2004 00:58:44 -0000       1.6
  +++ OptionConverter.cs        10 Sep 2004 18:54:14 -0000      1.7
  @@ -87,41 +87,41 @@
   //                   return a;
   //           }
     
  -             /// <summary>
  -             /// Converts string escape characters back to their correct 
values.
  -             /// </summary>
  -             /// <param name="s">String to convert.</param>
  -             /// <returns>Converted result.</returns>
  -             public static string ConvertSpecialChars(string s) 
  -             {
  -                     if (s == null)
  -                     {
  -                             throw new ArgumentNullException("s");
  -                     }
  -                     char c;
  -                     int len = s.Length;
  -                     StringBuilder buf = new StringBuilder(len);
  -     
  -                     int i = 0;
  -                     while(i < len) 
  -                     {
  -                             c = s[i++];
  -                             if (c == '\\') 
  -                             {
  -                                     c =  s[i++];
  -                                     if (c == 'n')     c = '\n';
  -                                     else if (c == 'r') c = '\r';
  -                                     else if (c == 't') c = '\t';
  -                                     else if (c == 'f') c = '\f';
  -                                     else if (c == '\b') c = '\b';           
                        
  -                                     else if (c == '\"') c = '\"';           
                
  -                                     else if (c == '\'') c = '\'';           
        
  -                                     else if (c == '\\') c = '\\';           
        
  -                             }
  -                             buf.Append(c);    
  -                     }
  -                     return buf.ToString();
  -             }
  +//           /// <summary>
  +//           /// Converts string escape characters back to their correct 
values.
  +//           /// </summary>
  +//           /// <param name="s">String to convert.</param>
  +//           /// <returns>Converted result.</returns>
  +//           public static string ConvertSpecialChars(string s) 
  +//           {
  +//                   if (s == null)
  +//                   {
  +//                           throw new ArgumentNullException("s");
  +//                   }
  +//                   char c;
  +//                   int len = s.Length;
  +//                   StringBuilder buf = new StringBuilder(len);
  +//   
  +//                   int i = 0;
  +//                   while(i < len) 
  +//                   {
  +//                           c = s[i++];
  +//                           if (c == '\\') 
  +//                           {
  +//                                   c =  s[i++];
  +//                                   if (c == 'n')     c = '\n';
  +//                                   else if (c == 'r') c = '\r';
  +//                                   else if (c == 't') c = '\t';
  +//                                   else if (c == 'f') c = '\f';
  +//                                   else if (c == '\b') c = '\b';           
                        
  +//                                   else if (c == '\"') c = '\"';           
                
  +//                                   else if (c == '\'') c = '\'';           
        
  +//                                   else if (c == '\\') c = '\\';           
        
  +//                           }
  +//                           buf.Append(c);    
  +//                   }
  +//                   return buf.ToString();
  +//           }
   
                /// <summary>
                /// Converts a string to a <see cref="bool" /> value.
  
  
  

Reply via email to