internal static ScarfContext GetThreadContext() { if (threadContext == null) { threadContext = new ScarfContext(null); } return(threadContext); }
private void Dispose(bool byUser) { if (byUser) { GC.SuppressFinalize(this); } Rollback(); IsDisposed = true; threadContext = null; }
public static IScarfContext BeginInlineContext(HttpContextBase httpContext = null) { if (httpContext != null) { return(ScarfContext.GetCurrent(httpContext)); } if (ScarfContext.HasThreadContext) { throw new InvalidOperationException("Cannot have multiple inline contexts on the same thread!"); } return(ScarfContext.GetThreadContext()); }
internal static ScarfContext GetThreadContext() { if (threadContext == null) { threadContext = new ScarfContext(null); } return threadContext; }