Run() public method

Begins the interpretation of the current parse tree.
public Run ( Value>.Dictionary values ) : void
values Value>.Dictionary A dictionary with additional symbols to consider.
return void
Esempio n. 1
0
        /// <summary>
        /// Execute the evaluation of this parser instance with external symbols.
        /// </summary>
        /// <param name="input">The input to evaluate.</param>
        /// <param name="values">
        /// The values in an Hashtable containing string (name), Value (value) pairs.
        /// </param>
        /// <returns>The value from the evaluation.</returns>
        public Value Evaluate(String input, Dictionary <String, Value> values)
        {
            var query = new QueryContext(_primary, input);

            query.Run(values);
            return(query.Output);
        }
Esempio n. 2
0
        /// <summary>
        /// Begins the interpretation of the current parse tree.
        /// </summary>
        /// <param name="query">The query to extend.</param>
        /// <param name="values">
        /// The values in an anonymous object - containing name - value pairs.
        /// </param>
        public static void Run(this QueryContext query, Object values)
        {
            var symbols = values.ToDictionary();

            query.Run(symbols);
        }
Esempio n. 3
0
 /// <summary>
 /// Begins the interpretation of the current parse tree.
 /// </summary>
 /// <param name="query">The query to extend.</param>
 public static void Run(this QueryContext query)
 {
     query.Run(new Dictionary <String, Value>());
 }
Esempio n. 4
0
 /// <summary>
 /// Execute the evaluation of this parser instance with external symbols.
 /// </summary>
 /// <param name="input">The input to evaluate.</param>
 /// <param name="values">
 /// The values in an Hashtable containing string (name), Value (value) pairs.
 /// </param>
 /// <returns>The value from the evaluation.</returns>
 public Value Evaluate(String input, Dictionary<String, Value> values)
 {
     var query = new QueryContext(_primary, input);
     query.Run(values);
     return query.Output;
 }