internal void RestoreSavedProcessInfo(WfProcessActionContextState state)
        {
            state.NullCheck("state");

            if (state.NeedToRestore)
            {
                this.OriginalActivity = state.SavedOriginalActivity;
            }
        }
        internal WfProcessActionContextState SaveDifferentProcessInfo(IWfProcess process)
        {
            WfProcessActionContextState state = new WfProcessActionContextState();

            IWfProcess originalProcess = null;

            if (OriginalActivity != null)
            {
                originalProcess = OriginalActivity.Process;
            }

            state.SavedOriginalActivity = OriginalActivity;
            state.NeedToRestore         = (originalProcess != process);

            return(state);
        }