logging-log4net-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ni...@apache.org
Subject cvs commit: logging-log4net/src/Util/TypeConverters BooleanConverter.cs
Date Sun, 19 Dec 2004 19:24:35 GMT
nicko       2004/12/19 11:24:35

  Modified:    src/Util/TypeConverters BooleanConverter.cs
  Log:
  Updates suggested by FxCop.
  Minor naming changes to internal types.
  Perf improvements to type check + type cast code.
  
  Revision  Changes    Path
  1.4       +3 -2      logging-log4net/src/Util/TypeConverters/BooleanConverter.cs
  
  Index: BooleanConverter.cs
  ===================================================================
  RCS file: /home/cvs/logging-log4net/src/Util/TypeConverters/BooleanConverter.cs,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- BooleanConverter.cs	23 Feb 2004 03:18:05 -0000	1.3
  +++ BooleanConverter.cs	19 Dec 2004 19:24:35 -0000	1.4
  @@ -49,9 +49,10 @@
   		/// <returns>the converted object</returns>
   		public object ConvertFrom(object source)
   		{
  -			if (source is string)
  +			string str = source as string;
  +			if (str != null)
   			{
  -				return bool.Parse((string)source);
  +				return bool.Parse(str);
   			}
   			throw ConversionNotSupportedException.Create(typeof(bool), source);
   		}
  
  
  

Mime
View raw message