findStateMachineByName() public method

Provides the state machine which corresponds to the given name
public findStateMachineByName ( string name ) : DataDictionary.Types.StateMachine
name string
return DataDictionary.Types.StateMachine
コード例 #1
0
ファイル: NameSpace.cs プロジェクト: fakoor/ERTMSFormalSpecs
        /// <summary>
        ///     Either provides the requested state machine or creates it if it cannot be found
        /// </summary>
        /// <param name="name">The name pf the state machine</param>
        /// <param name="initialNameSpace">The namespace the state machine is being copied from</param>
        /// <returns></returns>
        public StateMachine GetStateMachineUpdate(string name, NameSpace initialNameSpace)
        {
            StateMachine retVal = null;

            if (name != null)
            {
                retVal = findStateMachineByName(name);
                StateMachine initialStateMachine = initialNameSpace.findStateMachineByName(name);
                if (retVal == null)
                {
                    retVal = initialStateMachine.CreateStateMachineUpdate(Dictionary);
                }
            }
            return(retVal);
        }
コード例 #2
0
        /// <summary>
        ///     Either provides the requested state machine or creates it if it cannot be found
        /// </summary>
        /// <param name="name">The name pf the state machine</param>
        /// <param name="initialNameSpace">The namespace the state machine is being copied from</param>
        /// <returns></returns>
        public StateMachine GetStateMachineUpdate(string name, NameSpace initialNameSpace)
        {
            StateMachine retVal = null;

            if (name != null)
            {
                retVal = findStateMachineByName(name);
                StateMachine initialStateMachine = initialNameSpace.findStateMachineByName(name);
                if (retVal == null)
                {
                    retVal = initialStateMachine.CreateStateMachineUpdate(Dictionary);
                }
            }
            return retVal;
        }