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