Пример #1
0
 /// <summary>
 /// Indicates that the given sub-expression is the next expected, giving it a
 /// name and specifying whether it is required.
 /// </summary>
 /// <param name="itemName">The name that the token will be identified with in the outer expression.</param>
 /// <param name="definition">The definition for the sub-expression.</param>
 /// <returns>The updated expression.</returns>
 public Options Add(string itemName, ExpressionDefinition definition)
 {
     if (definition == null)
     {
         throw new ArgumentNullException("definition");
     }
     IExpressionItem item = new Expression(definition);
     options.Add(new ExpressionItem(itemName, false, item));
     return this;
 }