From: Owen R. <exo...@us...> - 2004-11-15 05:13:45
|
Update of /cvsroot/netreflector/NetReflector/src/NetReflector/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2560/src/NetReflector/util Modified Files: ReflectionUtil.cs StringUtil.cs XmlUtil.cs Log Message: - working on XmlDocumentationGenerator - started Xsd generation for NetReflector - lots of FxCop inspired improvements Index: StringUtil.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector/util/StringUtil.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** StringUtil.cs 22 Oct 2004 12:45:34 -0000 1.2 --- StringUtil.cs 15 Nov 2004 05:13:03 -0000 1.3 *************** *** 1,10 **** using System; using System.Collections; using System.Text; namespace Exortech.NetReflector.Util { ! public class StringUtil { public static bool EqualsIgnoreCase(string a, string b) { --- 1,14 ---- using System; using System.Collections; + using System.Globalization; using System.Text; namespace Exortech.NetReflector.Util { ! public sealed class StringUtil { + // Static utility class + private StringUtil() { } + public static bool EqualsIgnoreCase(string a, string b) { *************** *** 23,26 **** --- 27,35 ---- return builder.ToString(); } + + public static string Format(string format, params object[] args) + { + return string.Format(CultureInfo.InvariantCulture, format, args); + } } } Index: ReflectionUtil.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector/util/ReflectionUtil.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ReflectionUtil.cs 6 Jul 2004 05:13:23 -0000 1.2 --- ReflectionUtil.cs 15 Nov 2004 05:13:03 -0000 1.3 *************** *** 3,8 **** namespace Exortech.NetReflector.Util { ! public class ReflectionUtil { public static bool IsCommonType(Type t) { --- 3,11 ---- namespace Exortech.NetReflector.Util { ! public sealed class ReflectionUtil { + // Static utility class + private ReflectionUtil() { } + public static bool IsCommonType(Type t) { *************** *** 18,22 **** catch (Exception e) { ! string message = string.Format("Unable to create an instance of reflected type '{0}'. Please verify that this object has a default constructor.", type); throw new NetReflectorException(message, e); } --- 21,25 ---- catch (Exception e) { ! string message = StringUtil.Format("Unable to create an instance of reflected type '{0}'. Please verify that this object has a default constructor.", type); throw new NetReflectorException(message, e); } Index: XmlUtil.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector/util/XmlUtil.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** XmlUtil.cs 5 Nov 2003 08:29:56 -0000 1.1 --- XmlUtil.cs 15 Nov 2004 05:13:03 -0000 1.2 *************** *** 1,3 **** - using System; using System.Xml; --- 1,2 ---- |