public void Execute()
{
CallToPostExecute currentCallToPostExecute = 0;
// Execute the work item if we are in the correct state
switch (GetWorkItemState())
{
case WorkItemState.InProgress:
currentCallToPostExecute |= CallToPostExecute.WhenWorkItemNotCanceled;
ExecuteWorkItem();
break;
case WorkItemState.Canceled:
currentCallToPostExecute |= CallToPostExecute.WhenWorkItemCanceled;
break;
default:
Debug.Assert(false);
throw new NotSupportedException();
}
// Run the post execute as needed
if ((currentCallToPostExecute & _workItemInfo.CallToPostExecute) != 0)
{
PostExecute();
}
_processingStopwatch.Stop();
}
// Token: 0x060017F3 RID: 6131 // RVA: 0x000745E8 File Offset: 0x000727E8 private void ExecuteWorkItem(WorkItem workItem_0) { this._windowsPCs.SampleWorkItemsWaitTime(workItem_0.WaitingTime); this._localPCs.SampleWorkItemsWaitTime(workItem_0.WaitingTime); try { workItem_0.Execute(); } finally { this._windowsPCs.SampleWorkItemsProcessTime(workItem_0.ProcessTime); this._localPCs.SampleWorkItemsProcessTime(workItem_0.ProcessTime); } }