コード例 #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);
        }