/// <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); }
/// <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); }
/// <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); }
/// <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); }
/// <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)); }
/// <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)); }
/// <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)); }
/// <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)); }
/// <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)); }
/// <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)); }
/// <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)); }
/// <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); }
/// <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)); }
/// <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)); }
/// <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)); }
/// <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)); }
/// <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)); }