From: Michael D. <mik...@us...> - 2005-01-23 15:37:59
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15133/NHibernate/Util Modified Files: PropertiesHelper.cs ReflectHelper.cs StringHelper.cs Log Message: Made mods from FxCop: Ensured default ctor was private. Sealed classes. Changed some const to static readonly. Parameter name cleanup. Index: ReflectHelper.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Util/ReflectHelper.cs,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** ReflectHelper.cs 3 Jan 2005 03:45:28 -0000 1.21 --- ReflectHelper.cs 23 Jan 2005 15:37:41 -0000 1.22 *************** *** 47,54 **** return true; } - catch( Exception ) - { - return false; - } } --- 47,50 ---- Index: StringHelper.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Util/StringHelper.cs,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** StringHelper.cs 1 Jan 2005 02:40:28 -0000 1.17 --- StringHelper.cs 23 Jan 2005 15:37:41 -0000 1.18 *************** *** 255,265 **** /// <summary> ! /// /// </summary> ! /// <param name="tfString"></param> ! /// <returns></returns> ! public static bool BooleanValue( string tfString ) { ! string trimmed = tfString.Trim().ToLower(); return trimmed.Equals( "true" ) || trimmed.Equals( "t" ); } --- 255,268 ---- /// <summary> ! /// Converts a <see cref="String"/> in the format of "true", "t", "false", or "f" to ! /// a <see cref="Boolean"/>. /// </summary> ! /// <param name="value">The string to convert.</param> ! /// <returns> ! /// The <c>value</c> converted to a <see cref="Boolean"/> . ! /// </returns> ! public static bool BooleanValue( string value ) { ! string trimmed = value.Trim().ToLower(); return trimmed.Equals( "true" ) || trimmed.Equals( "t" ); } Index: PropertiesHelper.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Util/PropertiesHelper.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** PropertiesHelper.cs 1 Jan 2005 02:40:02 -0000 1.8 --- PropertiesHelper.cs 23 Jan 2005 15:37:40 -0000 1.9 *************** *** 7,12 **** //Much of this code is taken from Maverick.NET /// <summary></summary> ! public class PropertiesHelper { /// <summary> /// --- 7,17 ---- //Much of this code is taken from Maverick.NET /// <summary></summary> ! public sealed class PropertiesHelper { + private PropertiesHelper() + { + // should not be created + } + /// <summary> /// *************** *** 120,128 **** /// <summary></summary> ! public const string TagParam = "param"; /// <summary></summary> ! public const string AttrValue = "value"; /// <summary></summary> ! public const string AttrName = "name"; /// <summary> --- 125,133 ---- /// <summary></summary> ! public static readonly string TagParam = "param"; /// <summary></summary> ! public static readonly string AttrValue = "value"; /// <summary></summary> ! public static readonly string AttrName = "name"; /// <summary> |