public virtual object SetHostExecutionContext(HostExecutionContext hostExecutionContext)
        {
            if (hostExecutionContext == null)
            {
                throw new InvalidOperationException(SR.HostExecutionContextManager_InvalidOperation_NotNewCaptureContext);
            }

            var switcher = new HostExecutionContextSwitcher(hostExecutionContext);
            t_currentContext = hostExecutionContext;
            return switcher;
        }
示例#2
0
        public virtual object SetHostExecutionContext(HostExecutionContext hostExecutionContext)
        {
            if (hostExecutionContext == null)
            {
                throw new InvalidOperationException(SR.HostExecutionContextManager_InvalidOperation_NotNewCaptureContext);
            }

            var switcher = new HostExecutionContextSwitcher(hostExecutionContext);

            t_currentContext = hostExecutionContext;
            return(switcher);
        }