Example #1
0
        internal SemanticItem Evaluate(ModuleField parameter, string source)
        {
            var lastInputValue = _inputValue;

            try
            {
                if (source == null)
                {
                    _inputValue = null;
                }
                else
                {
                    _inputValue = EvaluationContext.GetSubstitutionValue(source);
                }

                var value          = parameter.Evaluate(this);
                var interpretation = parameter.GetInterpretation(value);
                _fields[parameter] = interpretation;

                return(value);
            }
            finally
            {
                _inputValue = lastInputValue;
            }
        }
Example #2
0
 public T Value <T>(ModuleField <T> index)
 {
     return((T)_fields[index]);
 }
Example #3
0
        internal BodyModuleBase Param(ModuleField field, string source = null)
        {
            _parameters.Add(Tuple.Create(field, source));

            return(this);
        }