You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-dev@logging.apache.org by ni...@apache.org on 2004/12/19 20:23:07 UTC

cvs commit: logging-log4net/src/Core LoggingEvent.cs

nicko       2004/12/19 11:23:07

  Modified:    src/Core LoggingEvent.cs
  Log:
  Updates suggested by FxCop.
  Minor naming changes to internal types.
  Perf improvements to type check + type cast code.
  
  Revision  Changes    Path
  1.17      +10 -10    logging-log4net/src/Core/LoggingEvent.cs
  
  Index: LoggingEvent.cs
  ===================================================================
  RCS file: /home/cvs/logging-log4net/src/Core/LoggingEvent.cs,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- LoggingEvent.cs	6 Dec 2004 02:20:06 -0000	1.16
  +++ LoggingEvent.cs	19 Dec 2004 19:23:07 -0000	1.17
  @@ -719,7 +719,7 @@
   							LogLog.Debug("LoggingEvent: Security exception while trying to get current thread ID. Error Ignored. Empty thread name.");
   
   							// As a last resort use the hash code of the Thread object
  -							m_data.ThreadName = System.Threading.Thread.CurrentThread.GetHashCode().ToString();
  +							m_data.ThreadName = System.Threading.Thread.CurrentThread.GetHashCode().ToString(System.Globalization.CultureInfo.InvariantCulture);
   						}
   					}
   #endif
  @@ -967,7 +967,7 @@
   		/// </para>
   		/// </remarks>
   		[System.Security.Permissions.SecurityPermissionAttribute(System.Security.Permissions.SecurityAction.Demand, SerializationFormatter=true)]
  -		public void GetObjectData(SerializationInfo info, StreamingContext context)
  +		public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
   		{
   			// The caller must call FixVolatileData before this object
   			// can be serialized.
  @@ -1177,21 +1177,21 @@
   				if ((updateFlags & FixFlags.Message) != 0)
   				{
   					// Force the message to be rendered
  -					string tmp = this.RenderedMessage;
  +					string forceCreation = this.RenderedMessage;
   
   					m_fixFlags |= FixFlags.Message;
   				}
   				if ((updateFlags & FixFlags.Message) != 0)
   				{
   					// Force the message to be rendered
  -					string tmp = this.RenderedMessage;
  +					string forceCreation = this.RenderedMessage;
   
   					m_fixFlags |= FixFlags.Message;
   				}
   				if ((updateFlags & FixFlags.ThreadName) != 0)
   				{
   					// Grab the thread name
  -					string tmp = this.ThreadName;
  +					string forceCreation = this.ThreadName;
   
   					m_fixFlags |= FixFlags.ThreadName;
   				}
  @@ -1199,28 +1199,28 @@
   				if ((updateFlags & FixFlags.LocationInfo) != 0)
   				{
   					// Force the location information to be loaded
  -					LocationInfo lo = this.LocationInformation;
  +					LocationInfo forceCreation = this.LocationInformation;
   
   					m_fixFlags |= FixFlags.LocationInfo;
   				}
   				if ((updateFlags & FixFlags.UserName) != 0)
   				{
   					// Grab the user name
  -					string tmp = this.UserName;
  +					string forceCreation = this.UserName;
   
   					m_fixFlags |= FixFlags.UserName;
   				}
   				if ((updateFlags & FixFlags.Domain) != 0)
   				{
   					// Grab the domain name
  -					string tmp = this.Domain;
  +					string forceCreation = this.Domain;
   
   					m_fixFlags |= FixFlags.Domain;
   				}
   				if ((updateFlags & FixFlags.Identity) != 0)
   				{
   					// Grab the identity
  -					string tmp = this.Identity;
  +					string forceCreation = this.Identity;
   
   					m_fixFlags |= FixFlags.Identity;
   				}
  @@ -1228,7 +1228,7 @@
   				if ((updateFlags & FixFlags.Exception) != 0)
   				{
   					// Force the exception text to be loaded
  -					string tmp = GetExceptionString();
  +					string forceCreation = GetExceptionString();
   
   					m_fixFlags |= FixFlags.Exception;
   				}