コード例 #1
0
 /// <summary>
 /// Creates the instance of the <see cref="MathExpressionParser"/> type.
 /// </summary>
 /// <param name="termDefinitionsRepository">The term definitions repository.</param>
 /// <param name="grammarProductsFactory">The grammar products factory.</param>
 /// <param name="charsComparer">The chars comparer.</param>
 /// <returns>
 /// The created instance.
 /// </returns>
 public IExpressionParser Create(
     ITermDefinitionsRepository termDefinitionsRepository,
     IGrammarProductsFactory grammarProductsFactory,
     IEqualityComparer <char> charsComparer)
 {
     return(new MathExpressionParser(termDefinitionsRepository, grammarProductsFactory, charsComparer));
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MathExpressionParser"/> class.
 /// </summary>
 /// <param name="termDefinitionsRepository">The term definitions repository.</param>
 /// <param name="grammarProductsFactory">The grammar products factory.</param>
 /// <param name="charsComparer">The chars comparer.</param>
 public MathExpressionParser(
     ITermDefinitionsRepository termDefinitionsRepository,
     IGrammarProductsFactory grammarProductsFactory,
     IEqualityComparer <char> charsComparer)
 {
     _repository             = termDefinitionsRepository;
     _grammarProductsFactory = grammarProductsFactory;
     _charsComparer          = charsComparer;
 }