示例#1
0
 public static void Undo(object switcherObject)
 {
     if (switcherObject != null)
     {
         HostExecutionContextManager currentHostExecutionContextManager = HostExecutionContextManager.GetCurrentHostExecutionContextManager();
         if (currentHostExecutionContextManager != null)
         {
             currentHostExecutionContextManager.Revert(switcherObject);
         }
     }
 }
示例#2
0
        internal static Object SetHostExecutionContextInternal(HostExecutionContext hostContext)
        {
            HostExecutionContextManager hostMgr = HostExecutionContextManager.GetCurrentHostExecutionContextManager();
            Object switcher = null;

            if (hostMgr != null)
            {
                switcher = hostMgr.SetHostExecutionContext(hostContext);
            }
            return(switcher);
        }
示例#3
0
        internal static object SetHostExecutionContextInternal(HostExecutionContext hostContext)
        {
            HostExecutionContextManager executionContextManager = HostExecutionContextManager.GetCurrentHostExecutionContextManager();
            object obj = (object)null;

            if (executionContextManager != null)
            {
                obj = executionContextManager.SetHostExecutionContext(hostContext);
            }
            return(obj);
        }
示例#4
0
        internal static HostExecutionContext CaptureHostExecutionContext()
        {
            HostExecutionContext        executionContext        = (HostExecutionContext)null;
            HostExecutionContextManager executionContextManager = HostExecutionContextManager.GetCurrentHostExecutionContextManager();

            if (executionContextManager != null)
            {
                executionContext = executionContextManager.Capture();
            }
            return(executionContext);
        }
        internal static object SetHostExecutionContextInternal(HostExecutionContext hostContext)
        {
            HostExecutionContextManager currentHostExecutionContextManager = HostExecutionContextManager.GetCurrentHostExecutionContextManager();
            object result = null;

            if (currentHostExecutionContextManager != null)
            {
                result = currentHostExecutionContextManager.SetHostExecutionContext(hostContext);
            }
            return(result);
        }
        internal static HostExecutionContext CaptureHostExecutionContext()
        {
            HostExecutionContext        result = null;
            HostExecutionContextManager currentHostExecutionContextManager = HostExecutionContextManager.GetCurrentHostExecutionContextManager();

            if (currentHostExecutionContextManager != null)
            {
                result = currentHostExecutionContextManager.Capture();
            }
            return(result);
        }
示例#7
0
        internal static HostExecutionContext CaptureHostExecutionContext()
        {
            HostExecutionContext hostContext = null;
            // capture the host execution context
            HostExecutionContextManager hostMgr = HostExecutionContextManager.GetCurrentHostExecutionContextManager();

            if (hostMgr != null)
            {
                hostContext = hostMgr.Capture();
            }
            return(hostContext);
        }
示例#8
0
        static public void Undo(Object switcherObject)
        {
            if (switcherObject == null)
            {
                return;
            }
            // otherwise call the host
            HostExecutionContextManager hostMgr = HostExecutionContextManager.GetCurrentHostExecutionContextManager();

            if (hostMgr != null)
            {
                hostMgr.Revert(switcherObject);
            }
        }
示例#9
0
        public static void Undo(object switcherObject)
        {
            if (switcherObject == null)
            {
                return;
            }
            HostExecutionContextManager executionContextManager = HostExecutionContextManager.GetCurrentHostExecutionContextManager();

            if (executionContextManager == null)
            {
                return;
            }
            executionContextManager.Revert(switcherObject);
        }