Beispiel #1
0
 /// <summary>
 /// Constructor
 /// <seealso cref="ParserFactory"/>
 /// </summary>
 /// <remarks>
 /// <para>The <paramref name="resultsHandler" /> object is resposible for
 /// maintaining the option definitions and stores the results of parsing.
 /// </para>
 /// <para>The <see cref="ParserFactory"/> class can assist with constructing
 /// instances of the parser (handles <see cref="IOptionResults"/> object
 /// creating). If the factory is not used, the
 /// <see cref="PropertyFieldParserHelper"/> and
 /// <see cref="DictionaryParserHelper"/> classes can be used.</para>
 /// </remarks>
 /// <param name="resultsHandler">The interface containing the option
 /// definitions and handles the results of parsing.</param>
 public Parser(IOptionResults resultsHandler)
 {
     _resultsHandler = resultsHandler;
 }
Beispiel #2
0
		/// <summary>
		/// Build a parser using a custom <see cref="IOptionResults"/> handler.
		/// </summary>
		/// <param name="resultsHandler">Custom handler</param>
		/// <returns>Parser instance</returns>
		public static Parser BuildParser(IOptionResults resultsHandler)
		{
			return new Parser(resultsHandler);
		}
Beispiel #3
0
 /// <summary>
 /// Build a parser using a custom <see cref="IOptionResults"/> handler.
 /// </summary>
 /// <param name="resultsHandler">Custom handler</param>
 /// <returns>Parser instance</returns>
 public static Parser BuildParser(IOptionResults resultsHandler)
 {
     return(new Parser(resultsHandler));
 }
Beispiel #4
0
		/// <summary>
		/// Constructor
		/// <seealso cref="ParserFactory"/>
		/// </summary>
		/// <remarks>
		/// <para>The <paramref name="resultsHandler" /> object is resposible for
		/// maintaining the option definitions and stores the results of parsing.
		/// </para>
		/// <para>The <see cref="ParserFactory"/> class can assist with constructing
		/// instances of the parser (handles <see cref="IOptionResults"/> object
		/// creating). If the factory is not used, the 
		/// <see cref="PropertyFieldParserHelper"/> and
		/// <see cref="DictionaryParserHelper"/> classes can be used.</para>
		/// </remarks>
		/// <param name="resultsHandler">The interface containing the option
		/// definitions and handles the results of parsing.</param>
		public Parser(IOptionResults resultsHandler)
		{
			_resultsHandler = resultsHandler;
		}