private bool RunOne(Guid workflowInstanceId)
        {
            bool retval = false;

            DefaultWorkflowSchedulerService.WorkItem cs = null;
            lock (locker)
            {
                if (scheduleRequests.ContainsKey(workflowInstanceId))
                {
                    cs = scheduleRequests[workflowInstanceId];
                    scheduleRequests.Remove(workflowInstanceId);
                }
            }
            try
            {
                if (cs != null)
                {
                    WorkflowTrace.Host.TraceEvent(TraceEventType.Information, 0, "ManualWorkflowSchedulerService: Executing {0}", workflowInstanceId);
                    if (queueCounters != null)
                    {
                        foreach (PerformanceCounter p in queueCounters)
                        {
                            p.RawValue = scheduleRequests.Count;
                        }
                    }
                    cs.Invoke(this);
                    retval = true;
                }
            }
            catch (Exception e)
            {
                RaiseServicesExceptionNotHandledEvent(e, workflowInstanceId);
            }
            return(retval);
        }
        private bool RunOne(Guid workflowInstanceId)
        {
            bool flag = false;

            DefaultWorkflowSchedulerService.WorkItem item = null;
            lock (this.locker)
            {
                if (this.scheduleRequests.ContainsKey(workflowInstanceId))
                {
                    item = this.scheduleRequests[workflowInstanceId];
                    this.scheduleRequests.Remove(workflowInstanceId);
                }
            }
            try
            {
                if (item == null)
                {
                    return(flag);
                }
                WorkflowTrace.Host.TraceEvent(TraceEventType.Information, 0, "ManualWorkflowSchedulerService: Executing {0}", new object[] { workflowInstanceId });
                if (this.queueCounters != null)
                {
                    foreach (PerformanceCounter counter in this.queueCounters)
                    {
                        counter.RawValue = this.scheduleRequests.Count;
                    }
                }
                item.Invoke(this);
                flag = true;
            }
            catch (Exception exception)
            {
                base.RaiseServicesExceptionNotHandledEvent(exception, workflowInstanceId);
            }
            return(flag);
        }