internal WorkItem CreateWorkItem(ActivityInstance completedInstance, ActivityExecutor executor) { // We use the property to guard against the virtual method call // since we don't need it in the common case if (this.NeedsToGatherOutputs) { this.GatherOutputs(completedInstance); } CompletionWorkItem workItem; if (this.checkForCancelation) { workItem = new CompletionWithCancelationCheckWorkItem(this, completedInstance); } else { workItem = executor.CompletionWorkItemPool.Acquire(); workItem.Initialize(this, completedInstance); } if (completedInstance.InstanceMap != null) { completedInstance.InstanceMap.AddEntry(workItem); } return(workItem); }
internal WorkItem CreateWorkItem(ActivityInstance completedInstance, ActivityExecutor executor) { // We use the property to guard against the virtual method call // since we don't need it in the common case if (this.NeedsToGatherOutputs) { this.GatherOutputs(completedInstance); } CompletionWorkItem workItem; if (this.checkForCancelation) { workItem = new CompletionWithCancelationCheckWorkItem(this, completedInstance); } else { workItem = executor.CompletionWorkItemPool.Acquire(); workItem.Initialize(this, completedInstance); } if (completedInstance.InstanceMap != null) { completedInstance.InstanceMap.AddEntry(workItem); } return workItem; }
internal System.Activities.Runtime.WorkItem CreateWorkItem(System.Activities.ActivityInstance completedInstance, ActivityExecutor executor) { CompletionWorkItem item; if (this.NeedsToGatherOutputs) { this.GatherOutputs(completedInstance); } if (this.checkForCancelation) { item = new CompletionWithCancelationCheckWorkItem(this, completedInstance); } else { item = executor.CompletionWorkItemPool.Acquire(); item.Initialize(this, completedInstance); } if (completedInstance.InstanceMap != null) { completedInstance.InstanceMap.AddEntry(item); } return item; }
internal System.Activities.Runtime.WorkItem CreateWorkItem(System.Activities.ActivityInstance completedInstance, ActivityExecutor executor) { CompletionWorkItem item; if (this.NeedsToGatherOutputs) { this.GatherOutputs(completedInstance); } if (this.checkForCancelation) { item = new CompletionWithCancelationCheckWorkItem(this, completedInstance); } else { item = executor.CompletionWorkItemPool.Acquire(); item.Initialize(this, completedInstance); } if (completedInstance.InstanceMap != null) { completedInstance.InstanceMap.AddEntry(item); } return(item); }