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
Ejemplo 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);
        }
Ejemplo 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);
        }
Ejemplo 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>());
 }
Ejemplo 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;
 }