Esempio n. 1
0
 public override object Evaluate(IEvaluationContext context = null)
 {
     if (context == null)
     {
         context = DefaultContext;
     }
     return(context.GetVariable(_Description));
     //TODO: Fallback behaviour with no context?
 }
Esempio n. 2
0
        public override float Evaluate(IEvaluationContext context)
        {
            var variable = context.GetVariable(Symbol);

            if (!variable.IsAssigned)
            {
                throw new InvalidOperationException($"Expected variable '{Symbol}' to be set.");
            }
            return(variable.Value.Value);
        }