123 references to ActivityInstanceState
System.Activities (115)
System\Activities\ActivityInstance.cs (14)
41
ActivityInstanceState
state;
58
this.state =
ActivityInstanceState
.Executing;
73
Fx.Assert(value != null || this.state ==
ActivityInstanceState
.Closed, "");
138
internal
ActivityInstanceState
SerializedState
204
public
ActivityInstanceState
State
500
instance.state =
ActivityInstanceState
.Closed;
508
instance.state =
ActivityInstanceState
.Canceled;
676
currentInstance.state =
ActivityInstanceState
.Faulted;
1138
Fx.Assert(child.State ==
ActivityInstanceState
.Executing, "should only have children if they're still executing");
1270
this.state =
ActivityInstanceState
.Faulted;
1273
Fx.Assert(this.state !=
ActivityInstanceState
.Executing, "We must be in a completed state at this point.");
1275
if (this.state ==
ActivityInstanceState
.Closed)
1306
this.state =
ActivityInstanceState
.Canceled;
1313
this.state =
ActivityInstanceState
.Closed;
System\Activities\ActivityInstanceState.cs (5)
30
internal static string GetStateName(this
ActivityInstanceState
state)
34
case
ActivityInstanceState
.Executing:
36
case
ActivityInstanceState
.Closed:
38
case
ActivityInstanceState
.Canceled:
40
case
ActivityInstanceState
.Faulted:
System\Activities\ActivityUtilities.cs (2)
120
public static bool IsCompletedState(
ActivityInstanceState
state)
122
return state !=
ActivityInstanceState
.Executing;
System\Activities\Expressions\InvokeFunc.cs (17)
39
if (completedInstance.State ==
ActivityInstanceState
.Closed)
87
if (completedInstance.State ==
ActivityInstanceState
.Closed)
146
if (completedInstance.State ==
ActivityInstanceState
.Closed)
209
if (completedInstance.State ==
ActivityInstanceState
.Closed)
280
if (completedInstance.State ==
ActivityInstanceState
.Closed)
355
if (completedInstance.State ==
ActivityInstanceState
.Closed)
437
if (completedInstance.State ==
ActivityInstanceState
.Closed)
526
if (completedInstance.State ==
ActivityInstanceState
.Closed)
623
if (completedInstance.State ==
ActivityInstanceState
.Closed)
727
if (completedInstance.State ==
ActivityInstanceState
.Closed)
838
if (completedInstance.State ==
ActivityInstanceState
.Closed)
956
if (completedInstance.State ==
ActivityInstanceState
.Closed)
1082
if (completedInstance.State ==
ActivityInstanceState
.Closed)
1215
if (completedInstance.State ==
ActivityInstanceState
.Closed)
1355
if (completedInstance.State ==
ActivityInstanceState
.Closed)
1502
if (completedInstance.State ==
ActivityInstanceState
.Closed)
1656
if (completedInstance.State ==
ActivityInstanceState
.Closed)
System\Activities\Hosting\WorkflowInstance.cs (9)
535
if (this.executor.State !=
ActivityInstanceState
.Executing)
699
ActivityInstanceState
completionState = this.executor.State;
701
if (completionState ==
ActivityInstanceState
.Faulted)
706
else if (completionState ==
ActivityInstanceState
.Closed)
712
Fx.AssertAndThrow(completionState ==
ActivityInstanceState
.Canceled, "Cannot be executing a workflow instance when WorkflowState was completed.");
851
if (this.executor.State ==
ActivityInstanceState
.Executing)
1146
public
ActivityInstanceState
GetCompletionState()
1153
public
ActivityInstanceState
GetCompletionState(out Exception terminationException)
1161
public
ActivityInstanceState
GetCompletionState(out IDictionary<string, object> outputs, out Exception terminationException)
System\Activities\Runtime\ActivityExecutionWorkItem.cs (1)
32
return this.ActivityInstance.State ==
ActivityInstanceState
.Executing;
System\Activities\Runtime\ActivityExecutor.cs (14)
71
ActivityInstanceState
executionState;
339
public
ActivityInstanceState
State
347
return
ActivityInstanceState
.Executing;
612
internal
ActivityInstanceState
SerializedExecutionState
1445
this.executionState =
ActivityInstanceState
.Faulted;
1570
if (this.rootInstance.State ==
ActivityInstanceState
.Executing)
1610
else if (this.rootInstance.State !=
ActivityInstanceState
.Closed)
1618
this.executionState =
ActivityInstanceState
.Canceled;
1628
if (activityInstance.State !=
ActivityInstanceState
.Executing || activityInstance.IsCancellationRequested)
2286
Fx.Assert(this.executionState ==
ActivityInstanceState
.Executing, "We shouldn't have a guess at our completion state yet.");
2340
if (this.rootInstance.State ==
ActivityInstanceState
.Closed)
2510
if (completedInstance.State !=
ActivityInstanceState
.Closed && completedInstance.Parent.HasNotExecuted)
3270
return this.ActivityInstance.State ==
ActivityInstanceState
.Executing;
3629
return this.ActivityInstance.State ==
ActivityInstanceState
.Executing;
System\Activities\Runtime\CompletionBookmark.cs (1)
50
if (completedInstance.State !=
ActivityInstanceState
.Closed && completedInstance.Parent.HasNotExecuted)
System\Activities\Runtime\CompletionCallbackWrapper.cs (1)
247
if (this.CompletedInstance.State !=
ActivityInstanceState
.Closed && this.ActivityInstance.IsPerformingDefaultCancelation)
System\Activities\Runtime\EmptyWithCancelationCheckWorkItem.cs (1)
56
if (this.completedInstance.State !=
ActivityInstanceState
.Closed && this.ActivityInstance.IsPerformingDefaultCancelation)
System\Activities\Runtime\ExecuteSynchronousExpressionWorkItem.cs (4)
217
this.TrackState(executor,
ActivityInstanceState
.Closed, ref activityInfo);
225
this.TrackState(executor,
ActivityInstanceState
.Executing, ref activityInfo);
233
this.TrackState(executor,
ActivityInstanceState
.Faulted, ref activityInfo);
237
private void TrackState(ActivityExecutor executor,
ActivityInstanceState
state, ref ActivityInfo activityInfo)
System\Activities\Statements\CancellationScope.cs (2)
91
if (completedInstance.State ==
ActivityInstanceState
.Canceled ||
92
(context.IsCancellationRequested && completedInstance.State ==
ActivityInstanceState
.Faulted))
System\Activities\Statements\CompensableActivity.cs (3)
393
if (completedInstance.State ==
ActivityInstanceState
.Closed)
406
else if (completedInstance.State ==
ActivityInstanceState
.Canceled || completedInstance.State ==
ActivityInstanceState
.Faulted)
System\Activities\Statements\CompensationParticipant.cs (4)
204
if (completedInstance.State ==
ActivityInstanceState
.Closed)
231
if (completedInstance.State ==
ActivityInstanceState
.Closed)
288
if (completedInstance.State ==
ActivityInstanceState
.Closed)
352
if (completedInstance.State ==
ActivityInstanceState
.Closed)
System\Activities\Statements\Flowchart.cs (1)
306
if (completedInstance.State !=
ActivityInstanceState
.Closed)
System\Activities\Statements\ForEach.cs (2)
110
if (completedInstance.State ==
ActivityInstanceState
.Canceled ||
111
(context.IsCancellationRequested && completedInstance.State ==
ActivityInstanceState
.Faulted))
System\Activities\Statements\InternalState.cs (1)
701
else if (completedInstance.State ==
ActivityInstanceState
.Closed)
System\Activities\Statements\Parallel.cs (1)
174
if (completedInstance.State !=
ActivityInstanceState
.Closed && context.IsCancellationRequested)
System\Activities\Statements\ParallelForEach.cs (1)
106
if (completedInstance.State !=
ActivityInstanceState
.Closed && context.IsCancellationRequested)
System\Activities\Statements\Pick.cs (4)
154
case
ActivityInstanceState
.Closed:
157
case
ActivityInstanceState
.Canceled:
158
case
ActivityInstanceState
.Faulted:
312
if (completedInstance.State ==
ActivityInstanceState
.Closed && pickState.TriggerCompletionBookmark != null)
System\Activities\Statements\TransactionScope.cs (1)
396
if (instance.State ==
ActivityInstanceState
.Closed)
System\Activities\Statements\TryCatch.cs (1)
279
if (completedInstance != null && completedInstance.State !=
ActivityInstanceState
.Closed)
System\Activities\Statements\WorkflowCompensationBehavior.cs (5)
97
ActivityInstanceState
completionState = (
ActivityInstanceState
)value;
99
if (completionState ==
ActivityInstanceState
.Closed)
103
else if (completionState ==
ActivityInstanceState
.Canceled)
107
else if (completionState ==
ActivityInstanceState
.Faulted)
System\Activities\Tracking\ActivityStateRecord.cs (6)
28
internal ActivityStateRecord(Guid instanceId, ActivityInstance instance,
ActivityInstanceState
state)
33
internal ActivityStateRecord(Guid instanceId, ActivityInfo activity,
ActivityInstanceState
state)
40
case
ActivityInstanceState
.Executing:
43
case
ActivityInstanceState
.Closed:
46
case
ActivityInstanceState
.Canceled:
49
case
ActivityInstanceState
.Faulted:
System\Activities\WorkflowApplication.cs (11)
761
ActivityInstanceState
completionState = this.Controller.GetCompletionState(out dummyOutputs, out terminationException);
762
Fx.Assert(completionState !=
ActivityInstanceState
.Executing, "Activity cannot be executing when this method is called");
763
cancelled = (completionState ==
ActivityInstanceState
.Canceled);
5124
ActivityInstanceState
completionState = instance.Controller.GetCompletionState(out outputs, out completionException);
5148
case
ActivityInstanceState
.Closed:
5154
case
ActivityInstanceState
.Canceled:
5160
case
ActivityInstanceState
.Faulted:
5862
ActivityInstanceState
completionState = instance.Controller.GetCompletionState(out outputs, out completionException);
5864
if (completionState ==
ActivityInstanceState
.Faulted)
5869
else if (completionState ==
ActivityInstanceState
.Closed)
5882
Fx.AssertAndThrow(completionState ==
ActivityInstanceState
.Canceled, "Cannot be executing when WorkflowState was completed.");
System\Activities\WorkflowApplicationCompletedEventArgs.cs (3)
14
ActivityInstanceState
completionState;
18
internal WorkflowApplicationCompletedEventArgs(WorkflowApplication application, Exception terminationException,
ActivityInstanceState
completionState, IDictionary<string, object> outputs)
27
public
ActivityInstanceState
CompletionState
System.ServiceModel.Activities (8)
System\ServiceModel\Activities\Dispatcher\WorkflowServiceInstance.cs (6)
124
ActivityInstanceState
completionState;
1225
if (this.completionState ==
ActivityInstanceState
.Closed)
1549
if (this.completionState ==
ActivityInstanceState
.Faulted)
1554
else if (this.completionState ==
ActivityInstanceState
.Closed)
1567
Fx.AssertAndThrow(this.completionState ==
ActivityInstanceState
.Canceled, "Cannot be executing a service instance when WorkflowState was completed.");
2293
else if (this.state == State.Unloaded && this.completionState ==
ActivityInstanceState
.Faulted)
System\ServiceModel\Activities\TransactedReceiveScope.cs (1)
252
else if (completedInstance.State ==
ActivityInstanceState
.Closed)
System\ServiceModel\Activities\WorkflowCreationContext.cs (1)
57
ActivityInstanceState
completionState, IDictionary<string, object> workflowOutputs,