3 instantiations of State
System.Activities.Core.Presentation (3)
System\Activities\Core\Presentation\Factories\StateMachineWithInitialStateFactory.cs (1)
25
State state = new
State
()
System\Activities\Core\Presentation\StateContainerEditor.CompositeView.cs (1)
347
state = new
State
() { DisplayName = DefaultFinalStateDisplayName, IsFinal = true };
System\Activities\Core\Presentation\StateContainerEditor.xaml.cs (1)
1941
droppedModelItem = InsertState(new
State
()
91 references to State
System.Activities (36)
System\Activities\Statements\InternalState.cs (2)
26
State
state;
55
public InternalState(
State
state)
System\Activities\Statements\StateMachine.cs (32)
36
Collection<
State
> states;
70
public
State
InitialState
80
public Collection<
State
> States
86
this.states = new ValidatingCollection<
State
>
157
(NativeActivityMetadata m, Collection<
State
> states) => { ClearStates(states); },
158
(NativeActivityMetadata m,
State
state) => { ClearTransitions(state); },
166
(NativeActivityMetadata m,
State
state) => { MarkTransitionsInState(state); },
173
this.TraverseViaTransitions(delegate(
State
state) { MarkStateViaTransition(state); }, null);
180
(
State
state) =>
190
(NativeActivityMetadata m,
State
state) =>
240
static void MarkTransitionsInState(
State
state)
255
static void MarkStateViaTransition(
State
state)
260
static void ClearStates(Collection<
State
> states)
262
foreach (
State
state in states)
268
static void ClearState(
State
state)
275
static void ClearTransitions(
State
state)
288
static void ValidateStates(NativeActivityMetadata metadata, Collection<
State
> states)
290
foreach (
State
state in states)
297
static void ValidateState(NativeActivityMetadata metadata,
State
state)
336
static void ValidateTransitions(NativeActivityMetadata metadata,
State
currentState)
440
IEnumerable<
State
> distinctStates = this.states.Distinct();
442
foreach (
State
state in distinctStates)
505
Action<NativeActivityMetadata, Collection<
State
>> actionForStates,
506
Action<NativeActivityMetadata,
State
> actionForTransitions,
517
IEnumerable<
State
> distinctStates = this.States.Distinct();
518
foreach (
State
state in distinctStates)
532
void MarkStatesViaChildren(NativeActivityMetadata metadata, Collection<
State
> states)
538
State
state = states[i];
558
void TraverseViaTransitions(Action<
State
> actionForState, Action<Transition> actionForTransition)
560
Stack<
State
> stack = new Stack<
State
>();
565
State
currentState = stack.Pop();
System\Activities\Statements\Transition.cs (2)
58
public
State
To
101
internal
State
Source
System.Activities.Core.Presentation (55)
System\Activities\Core\Presentation\Factories\StateMachineWithInitialStateFactory.cs (1)
25
State
state = new State()
System\Activities\Core\Presentation\StateContainerEditor.CompositeView.cs (11)
114
.Where<ModelItem>((p) => { return p.ItemType == typeof(
State
); });
180
return (typeof(
State
) == type || typeof(FinalState) == type);
193
if (sourceStateItem.ItemType != typeof(
State
))
205
State
sourceState = (
State
)sourceStateItem.GetCurrentValue();
267
if (this.ModelItem.ItemType == typeof(
State
))
340
List<
State
> states = new List<
State
>();
344
State
state;
351
state = (
State
)obj;
370
foreach (
State
state in states)
System\Activities\Core\Presentation\StateContainerEditor.ModelChangeReactions.cs (4)
256
double defaultWidth = ((this.ModelItem.ItemType == typeof(
State
)) ? DefaultWidthForState : DefaultWidthForStateMachine);
262
double defaultHeight = ((this.ModelItem.ItemType == typeof(
State
)) ? DefaultHeightForState : DefaultHeightForStateMachine);
268
if ((e.ParentModelItem.ItemType == typeof(
State
) || (e.ParentModelItem.ItemType == typeof(StateMachine) && e.ParentModelItem == this.ModelItem)) &&
293
else if (e.ParentModelItem.ItemType == typeof(
State
) && e.Key.Equals(ShapeSizeViewStateKey))
System\Activities\Core\Presentation\StateContainerEditor.ModelChanges.cs (5)
102
State
state = stateModelItem.GetCurrentValue() as
State
;
125
newTransition.To = destModelItem.GetCurrentValue() as
State
;
307
if (modelItem.ItemType == typeof(
State
))
318
if (modelItem.ItemType == typeof(
State
) || modelItem.ItemType == typeof(StateMachine))
System\Activities\Core\Presentation\StateContainerEditor.Utilities.cs (8)
278
while (parent != null && parent.ItemType != typeof(
State
))
442
static bool IsTransitionDestinationWithinStates(Transition transition, IEnumerable<
State
> states)
444
foreach (
State
state in states)
455
static void RemoveDanglingTransitions(IEnumerable<
State
> states)
457
Queue<
State
> statesToProcess = new Queue<
State
>(states);
460
State
state = statesToProcess.Dequeue();
485
return modelItem.ItemType == typeof(
State
) && (bool)modelItem.Properties[StateDesigner.IsFinalPropertyName].Value.GetCurrentValue();
System\Activities\Core\Presentation\StateContainerEditor.xaml.cs (21)
382
if (modelItem.ItemType == typeof(
State
))
445
if (modelItem.ItemType == typeof(
State
))
458
if (this.ModelItem.ItemType == typeof(
State
) && this.stateMachineContainerEditor != null)
730
Fx.Assert(stateModelItem.ItemType == typeof(
State
), "The ModelItem should be a State.");
1247
if (this.ModelItem.ItemType == typeof(
State
))
1264
if ((element is VirtualizedContainerService.VirtualizingContainer) && ((VirtualizedContainerService.VirtualizingContainer)element).ModelItem.ItemType == typeof(
State
))
1921
if (droppedModelItem.ItemType == typeof(
State
) && this.ModelItem.ItemType == typeof(StateMachine))
1930
if (droppedObject.GetType() == typeof(
State
))
1932
if (((
State
)droppedObject).DisplayName == null)
1934
((
State
)droppedObject).DisplayName = GenerateStateName();
2073
else if (modelItem.ItemType == typeof(
State
) && this.IsStateMachineContainer && StateContainerEditor.AreInSameStateMachine(modelItem, this.ModelItem))
2086
else if (this.ModelItem.ItemType == typeof(StateMachine) && DragDropHelper.AllowDrop(e.Data, this.Context, typeof(
State
), typeof(FinalState), typeof(StartNode)))
2165
existingStateNames.Add(((
State
)stateModelItem.GetCurrentValue()).DisplayName);
2187
Fx.Assert(this.ModelItem.ItemType == typeof(
State
), "ModelItem type should be State.");
2309
parent.ModelItem.ItemType == typeof(
State
) && !parent.IsRootDesigner);
2366
if (sourceModelItem != null && droppedModelItem.ItemType == typeof(
State
))
2368
if (sourceModelItem.ItemType == typeof(
State
))
2374
To = droppedModelItem.GetCurrentValue() as
State
2418
if (types.Count != 1 || (types[0] != typeof(
State
) && types[0] != typeof(FinalState)))
2604
if (draggedTypes.Count != 1 || draggedTypes[0] != typeof(
State
))
2635
To = destinationModelItem.GetCurrentValue() as
State
System\Activities\Core\Presentation\StateContainerResizeGrip.cs (1)
70
else if (stateContainerModelItem.ItemType == typeof(
State
))
System\Activities\Core\Presentation\StateDesigner.xaml.cs (1)
60
Type stateType = typeof(
State
);
System\Activities\Core\Presentation\StateMachineValidationErrorSourceLocator.cs (1)
74
foreach (
State
state in machine.States)
System\Activities\Core\Presentation\TransitionDesigner.xaml.cs (2)
451
State
toState = toStateModelItem.GetCurrentValue() as
State
;