示例#1
0
 /// <summary>
 /// Creates a new instance and sets the values.
 /// </summary>
 /// <param name="values">The initial values to use.</param>
 public ObjectValue(Object values)
     : this(values.ToDictionary())
 {
 }
 /// <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);
 }
 /// <summary>
 /// Sets the headers with the name of the properties and their 
 /// assigned values.
 /// </summary>
 /// <param name="obj">The object to decompose.</param>
 /// <returns>The current instance.</returns>
 public VirtualResponse Headers(Object obj)
 {
     var headers = obj.ToDictionary();
     return Headers(headers);
 }
示例#4
0
 /// <summary>
 /// Execute the evaluation of this parser instance with external symbols.
 /// </summary>
 /// <param name="parser">The parser to extend.</param>
 /// <param name="input">The input to evaluate.</param>
 /// <param name="values">
 /// The values in an anonymous object - containing name - value pairs.
 /// </param>
 /// <returns>The value from the evaluation.</returns>
 public static Value Evaluate(this Parser parser, String input, Object values)
 {
     var symbols = values.ToDictionary();
     return parser.Evaluate(input, symbols);
 }