//------------------------------------------------------------------------------ // // Copyright (c) Microsoft Corporation. All rights reserved. // //------------------------------------------------------------------------------ namespace System.Activities.Statements { using System.Activities; using System.Activities.Statements; using System.Collections.ObjectModel; using System.ComponentModel; /// /// InternalTransition is internal representation of transition. /// Its difference from transition is that if several transition share the same trigger, all of them belongs to the same internal transition. /// Their different conditions, actions, Tos would be put into TransitionDataList. /// sealed class InternalTransition { Collection transitionDataList; /// /// Gets or sets the index of this InternalTransition in internalTransitions list of its parent state. /// public int InternalTransitionIndex { get; set; } /// /// Gets a value indicating whether this transition is unconditional. /// public bool IsUnconditional { get { return this.transitionDataList.Count == 1 && this.transitionDataList[0].Condition == null; } } /// /// Gets TransitionDataList contains Tos, Conditions, Actions of different transitions which share the same trigger. /// public Collection TransitionDataList { get { if (this.transitionDataList == null) { this.transitionDataList = new Collection(); } return this.transitionDataList; } } /// /// Gets or sets trigger object of this internal transition. /// public Activity Trigger { get; set; } } }