Esempio n. 1
0
        /// <summary>
        ///     Provides the enum value which corresponds to the name provided
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        public EnumValue findEnumValue(string name)
        {
            EnumValue retVal = null;

            retVal = (EnumValue)NamableUtils.FindByName(name, SpecialValues);

            return(retVal);
        }
Esempio n. 2
0
        /// <summary>
        ///     Provides the enum value which corresponds to the name provided
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        public EnumValue FindEnumValue(string name)
        {
            EnumValue retVal = (EnumValue)NamableUtils.FindByName(name, Values);

            if (retVal == null && EnclosingEnum != null)
            {
                retVal = EnclosingEnum.FindEnumValue(name);
            }

            return(retVal);
        }
Esempio n. 3
0
        /// <summary>
        ///     Provides the type which corresponds to the given name
        /// </summary>
        /// <param name="name">the type name to find</param>
        /// <param name="findInEnclosingNameSpaces">indicates that the search must be performed in the enclosing namespaces</param>
        /// <returns></returns>
        private Type innerFindTypeByName(string name, bool findInEnclosingNameSpaces)
        {
            Type retVal = null;

            string[] names = name.Split('.');
            if (names.Length == 1)
            {
                retVal = (Type)NamableUtils.FindByName(name, Types);
            }
            else
            {
                NameSpace nameSpace = (NameSpace)NamableUtils.FindByName(names[0], NameSpaces);
                if (nameSpace != null)
                {
                    retVal = nameSpace.innerFindTypeByName(name.Substring(nameSpace.Name.Length + 1), false);
                }
            }

            if (retVal == null && findInEnclosingNameSpaces && EnclosingNameSpace != null)
            {
                retVal = EnclosingNameSpace.innerFindTypeByName(name, true);
            }

            //HacK: get the unified structure to take care of Updates
            Structure structure = retVal as Structure;

            if (structure != null)
            {
                retVal = structure.UnifiedStructure;
            }

            //HacK: get the unified state machine to take care of Updates
            StateMachine stateMachine = retVal as StateMachine;

            if (stateMachine != null)
            {
                retVal = stateMachine.UnifiedStateMachine;
            }

            return(retVal);
        }
Esempio n. 4
0
        /// <summary>
        ///     Provides the values whose name matches the name provided
        /// </summary>
        /// <param name="index">the index in names to consider</param>
        /// <param name="names">the simple value names</param>
        public IValue findValue(string[] names, int index)
        {
            State retVal = null;

            if (index < names.Length)
            {
                retVal = (State)NamableUtils.FindByName(names[index], States);
                ;

                if (retVal != null && index < names.Length - 1)
                {
                    StateMachine stateMachine = retVal.StateMachine;
                    if (stateMachine != null)
                    {
                        retVal = (State)stateMachine.findValue(names, index + 1);
                    }
                }
            }

            return(retVal);
        }
Esempio n. 5
0
 /// <summary>
 ///     Provides the state machine which corresponds to the given name
 /// </summary>
 /// <param name="name"></param>
 /// <returns></returns>
 public StateMachine findStateMachineByName(string name)
 {
     return((StateMachine)NamableUtils.FindByName(name, StateMachines));
 }
Esempio n. 6
0
 /// <summary>
 ///     Provides the structure which corresponds to the given name
 /// </summary>
 /// <param name="name"></param>
 /// <returns></returns>
 public Structure findStructureByName(string name)
 {
     return((Structure)NamableUtils.FindByName(name, Structures));
 }
Esempio n. 7
0
 /// <summary>
 ///     Provides the namespace which corresponds to the given name
 /// </summary>
 /// <param name="name"></param>
 /// <returns></returns>
 public NameSpace findNameSpaceByName(string name)
 {
     return((NameSpace)NamableUtils.FindByName(name, NameSpaces));
 }
Esempio n. 8
0
 /// <summary>
 ///     Provides the rule which corresponds to the name provided
 /// </summary>
 /// <param name="name"></param>
 /// <returns></returns>
 public Rule FindRule(string name)
 {
     return((Rule)NamableUtils.FindByName(name, Rules));
 }
Esempio n. 9
0
 /// <summary>
 ///     Provides the precondition which corresponds to the name provided
 /// </summary>
 /// <param name="name"></param>
 /// <returns></returns>
 public PreCondition FindPreCondition(string name)
 {
     return((PreCondition)NamableUtils.FindByName(name, PreConditions));
 }
Esempio n. 10
0
 /// <summary>
 ///     Provides the procedure which corresponds to the name provided
 /// </summary>
 /// <param name="name"></param>
 /// <returns></returns>
 public Procedure FindProcedure(string name)
 {
     return((Procedure)NamableUtils.FindByName(name, Procedures));
 }
Esempio n. 11
0
 /// <summary>
 ///     Provides the sub enum which corresponds to the name provided
 /// </summary>
 /// <param name="name"></param>
 /// <returns></returns>
 public Enum FindSubEnum(string name)
 {
     return((Enum)NamableUtils.FindByName(name, SubEnums));
 }
Esempio n. 12
0
        /// <summary>
        ///     Provides the namespace whose name matches the name provided
        /// </summary>
        public Types.NameSpace FindNameSpace(string name)
        {
            Types.NameSpace retVal = (Types.NameSpace)NamableUtils.FindByName(name, NameSpaces);

            return(retVal);
        }
Esempio n. 13
0
 /// <summary>
 ///     Provides the frame which corresponds to the name provided
 /// </summary>
 /// <param name="name"></param>
 /// <returns></returns>
 public Frame FindFrame(string name)
 {
     return((Frame)NamableUtils.FindByName(name, Tests));
 }
Esempio n. 14
0
 /// <summary>
 ///     Finds a test case whose name corresponds to the name provided
 /// </summary>
 /// <param name="name"></param>
 /// <returns></returns>
 public SubSequence FindSubSequence(string name)
 {
     return((SubSequence)NamableUtils.FindByName(name, SubSequences));
 }
Esempio n. 15
0
 /// <summary>
 ///     Provides the action which corresponds to the name provided
 /// </summary>
 /// <param name="name"></param>
 /// <returns></returns>
 public Action FindAction(string name)
 {
     return((Action)NamableUtils.FindByName(name, Actions));
 }
Esempio n. 16
0
 /// <summary>
 ///     Provides the rule condition which corresponds to the name provided
 /// </summary>
 /// <param name="name"></param>
 /// <returns></returns>
 public RuleCondition FindRuleCondition(string name)
 {
     return((RuleCondition)NamableUtils.FindByName(name, RuleConditions));
 }
Esempio n. 17
0
 /// <summary>
 ///     Provides the structure element which corresponds to the name provided
 /// </summary>
 /// <param name="name"></param>
 /// <returns></returns>
 public StructureElement FindStructureElement(string name)
 {
     return((StructureElement)NamableUtils.FindByName(name, Elements));
 }