Пример #1
0
        public virtual void Dispose()
        {
            try
            {
                using (Profiler.Measure("WorkflowRunContext.Dispose"))
                {
                    // deal with deferred stuff
                    if (TriggerDepth == 0 || _parentContext == null || HandleDeferred)
                    {
                        HandleDeferredStuff();
                    }


                    // Pop
                    _currentContext = _parentContext;
                }
            }
            finally
            {
                if (_profiler != null)
                {
                    _profiler.Dispose();
                }
            }
        }
Пример #2
0
        public WorkflowRunContext(WorkflowRunContext other, bool handleDeferred)
        {
            HandleDeferred = handleDeferred;

            _profiler = Profiler.Measure("WorkflowRunContext", false);
            if (other != null)
            {
                RunTriggersInCurrentThread = other.RunTriggersInCurrentThread;
                DisableTriggers            = other.DisableTriggers;
                TriggerDepth    = other.TriggerDepth;
                _parentContext  = _currentContext;
                _currentContext = this;
            }
        }
Пример #3
0
 public WorkflowRunContext(WorkflowRunContext other) : this(other, false)
 {
 }