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

            if (hostMgr != null)
            {
                switcher = hostMgr.SetHostExecutionContext(hostContext);
            }
            return(switcher);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 9
0
        public static void Undo(object switcherObject)
        {
            if (switcherObject == null)
            {
                return;
            }
            HostExecutionContextManager executionContextManager = HostExecutionContextManager.GetCurrentHostExecutionContextManager();

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