GetVariable() public method

Provides the variable designated by this designator according to the interpretation context
public GetVariable ( DataDictionary.Interpreter.InterpretationContext context ) : IVariable
context DataDictionary.Interpreter.InterpretationContext
return IVariable
Esempio n. 1
0
        /// <summary>
        ///     Provides the variable referenced by this expression, if any
        /// </summary>
        /// <param name="context">The context on which the variable must be found</param>
        /// <returns></returns>
        public IVariable GetVariable(InterpretationContext context)
        {
            IVariable retVal = null;

            if (Designator != null)
            {
                retVal = Designator.GetVariable(context);
            }

            return(retVal);
        }
Esempio n. 2
0
        /// <summary>
        /// Provides the variable referenced by this expression, if any
        /// </summary>
        /// <param name="context">The context on which the variable must be found</param>
        /// <returns></returns>
        public Variables.IVariable GetVariable(InterpretationContext context)
        {
            Variables.IVariable retVal = null;

            if (Designator != null)
            {
                retVal = Designator.GetVariable(context);
            }
            else if (LiteralValue != null)
            {
                retVal = null;
            }

            return(retVal);
        }