DataDictionary.Types.Structure.FindStateMachine C# (CSharp) Méthode

FindStateMachine() public méthode

Provides the state machine which corresponds to the name provided
public FindStateMachine ( string name ) : StateMachine
name string
Résultat StateMachine
        public StateMachine FindStateMachine(string name)
        {
            return (StateMachine) NamableUtils.FindByName(name, StateMachines);
        }

Usage Example

Exemple #1
0
        /// <summary>
        ///     Sets the update information for this structure
        /// </summary>
        /// <param name="source">The source structure for which this structure has been created (as an update)</param>
        public override void SetUpdateInformation(ModelElement source)
        {
            base.SetUpdateInformation(source);
            Structure sourceStructure = (Structure)source;

            foreach (StructureElement element in Elements)
            {
                StructureElement baseElement = sourceStructure.FindStructureElement(element.Name);
                if (baseElement != null)
                {
                    element.SetUpdateInformation(baseElement);
                }
            }

            foreach (Procedure procedure in Procedures)
            {
                Procedure baseProcedure = sourceStructure.FindProcedure(procedure.Name);
                if (baseProcedure != null)
                {
                    procedure.SetUpdateInformation(baseProcedure);
                }
            }

            foreach (Rule rule in Rules)
            {
                Rule baseRule = sourceStructure.FindRule(rule.Name);
                if (baseRule != null)
                {
                    rule.SetUpdateInformation(baseRule);
                }
            }

            foreach (StateMachine stateMachine in StateMachines)
            {
                StateMachine baseStateMachine = sourceStructure.FindStateMachine(stateMachine.Name);
                if (baseStateMachine != null)
                {
                    stateMachine.SetUpdateInformation(baseStateMachine);
                }
            }
        }