コード例 #1
0
 static Find()
 {
     // Initialize the static variables.
     // Operator Expressions
     AddExpression(typeof(And));
     // Action Expressions
     AddExpression(typeof(Print));
     // Navigation Expressions
     // Matcher Expressions
     AddExpression(typeof(Name));
     Description = BuildDescription(ExpressionFactory.GetExpressionFactory());
     // Register the expressions with the expression factory.
     RegisterExpressions(ExpressionFactory.GetExpressionFactory());
 }
コード例 #2
0
 /// <summary>Asks the factory whether an expression is recognized.</summary>
 private bool IsExpression(string expressionName)
 {
     return(ExpressionFactory.GetExpressionFactory().IsExpression(expressionName));
 }
コード例 #3
0
 /// <summary>Gets an instance of an expression from the factory.</summary>
 private Expression GetExpression(Type expressionClass)
 {
     return(ExpressionFactory.GetExpressionFactory().CreateExpression(expressionClass,
                                                                      GetConf()));
 }
コード例 #4
0
 /// <summary>Gets a named expression from the factory.</summary>
 private Expression GetExpression(string expressionName)
 {
     return(ExpressionFactory.GetExpressionFactory().GetExpression(expressionName, GetConf
                                                                       ()));
 }