From: <fab...@us...> - 2009-11-20 15:55:22
|
Revision: 4842 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4842&view=rev Author: fabiomaulo Date: 2009-11-20 15:55:07 +0000 (Fri, 20 Nov 2009) Log Message: ----------- Minor (cleaned) Modified Paths: -------------- branches/2.1.x/nhibernate/src/NHibernate/Impl/SessionIdLoggingContext.cs Modified: branches/2.1.x/nhibernate/src/NHibernate/Impl/SessionIdLoggingContext.cs =================================================================== --- branches/2.1.x/nhibernate/src/NHibernate/Impl/SessionIdLoggingContext.cs 2009-11-20 15:19:50 UTC (rev 4841) +++ branches/2.1.x/nhibernate/src/NHibernate/Impl/SessionIdLoggingContext.cs 2009-11-20 15:55:07 UTC (rev 4842) @@ -1,13 +1,11 @@ using System; -using log4net; namespace NHibernate.Impl { - using System.Web; - public class SessionIdLoggingContext : IDisposable { - [ThreadStatic] private static Guid? CurrentSessionId; + [ThreadStatic] + private static Guid? CurrentSessionId; private readonly Guid? oldSessonId; @@ -20,25 +18,23 @@ /// <summary> /// We always set the result to use a thread static variable, on the face of it, /// it looks like it is not a valid choice, since ASP.Net and WCF may decide to switch - /// threads on us. But, since SessionIdLoggingContext is only used inside NH calls, and since - /// NH calls are never async, this isn't an issue for us. - /// In addition to that, attempting to match to the current context has proven to be performance hit. + /// threads on us. But, since SessionIdLoggingContext is only used inside NH calls, and since + /// NH calls are never async, this isn't an issue for us. + /// In addition to that, attempting to match to the current context has proven to be performance hit. /// </summary> public static Guid? SessionId { - get - { - return CurrentSessionId; - } - set - { - CurrentSessionId = value; - } + get { return CurrentSessionId; } + set { CurrentSessionId = value; } } + #region IDisposable Members + public void Dispose() { SessionId = oldSessonId; } + + #endregion } } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |