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 PatternLayoutConverter.cs
Date Sun, 19 Dec 2004 19:24:52 GMT
nicko       2004/12/19 11:24:52

  Modified:    src/Util/TypeConverters PatternLayoutConverter.cs
  Log:
  Updates suggested by FxCop.
  Minor naming changes to internal types.
  Perf improvements to type check + type cast code.
  
  Revision  Changes    Path
  1.2       +3 -2      logging-log4net/src/Util/TypeConverters/PatternLayoutConverter.cs
  
  Index: PatternLayoutConverter.cs
  ===================================================================
  RCS file: /home/cvs/logging-log4net/src/Util/TypeConverters/PatternLayoutConverter.cs,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PatternLayoutConverter.cs	19 Aug 2004 21:19:52 -0000	1.1
  +++ PatternLayoutConverter.cs	19 Dec 2004 19:24:52 -0000	1.2
  @@ -52,9 +52,10 @@
   		/// <returns>the PatternLayout</returns>
   		public object ConvertFrom(object source) 
   		{
  -			if (source is string) 
  +			string str = source as string;
  +			if (str != null)
   			{
  -				return new PatternLayout((string)source);
  +				return new PatternLayout(str);
   			}
   			throw ConversionNotSupportedException.Create(typeof(PatternLayout), source);
   		}
  
  
  

Mime
View raw message