Exemple #1
0
        /// <summary>
        /// Try to get an input variable by its low-level name
        /// </summary>
        /// <param name="lowLevelVarName"></param>
        /// <param name="inputVar"></param>
        /// <returns></returns>
        public bool TryGetInputVariable(string lowLevelVarName, out GMacCbInputVariable inputVar)
        {
            if (VariablesDictionary.Count == 0)
            {
                inputVar = InputVariables.FirstOrDefault(item => item.LowLevelName == lowLevelVarName);
                return(inputVar != null);
            }

            GMacCbVariable result;

            if (VariablesDictionary.TryGetValue(lowLevelVarName, out result) == false)
            {
                inputVar = null;
                return(false);
            }

            inputVar = result as GMacCbInputVariable;
            return(inputVar != null);
        }
Exemple #2
0
        /// <summary>
        /// Try to get an input parameter variable by its associated datastore value access
        /// </summary>
        /// <param name="paramValueAccess"></param>
        /// <param name="inputParamVar"></param>
        /// <returns></returns>
        public bool TryGetInputParameterVariable(AstDatastoreValueAccess paramValueAccess, out GMacCbInputVariable inputParamVar)
        {
            inputParamVar = null;
            IGMacCbParameterVariable paramVar;

            if (!TryGetParameterVariable(paramValueAccess, out paramVar))
            {
                return(false);
            }

            inputParamVar = paramVar as GMacCbInputVariable;
            return(inputParamVar != null);
        }
Exemple #3
0
 /// <summary>
 /// Adds an input variable to this block
 /// </summary>
 /// <param name="inputVar"></param>
 internal void AddInputVariable(GMacCbInputVariable inputVar)
 {
     _inputVariables.Add(inputVar);
 }