@@ -11,60 +11,105 @@ public class CsvParserBuilder : IParserBuilder
1111 {
1212 private readonly CsvRecordParserFactory _parser = new CsvRecordParserFactory ( ) ;
1313
14+ /// <summary>
15+ /// Sets the delimiter character
16+ /// </summary>
17+ /// <param name="delimiter">The delimiter to set</param>
18+ /// <returns>the <see cref="CsvParserBuilder"/></returns>
1419 public CsvParserBuilder Delimiter ( char delimiter )
1520 {
1621 _parser . Delimiter = delimiter ;
1722 return this ;
1823 }
1924
25+ /// <summary>
26+ /// Sets the quote character
27+ /// </summary>
28+ /// <param name="quote">The quote character to set</param>
29+ /// <returns>the <see cref="CsvParserBuilder"/></returns>
2030 public CsvParserBuilder Quote ( char quote )
2131 {
2232 _parser . Quote = quote ;
2333 return this ;
2434 }
2535
36+ /// <summary>
37+ /// Sets the escape character
38+ /// </summary>
39+ /// <param name="escape">The escape character to set</param>
40+ /// <returns>the <see cref="CsvParserBuilder"/></returns>
2641 public CsvParserBuilder Escape ( char escape )
2742 {
2843 _parser . Escape = escape ;
2944 return this ;
3045 }
3146
47+ /// <summary>
48+ /// Sets the record terminator
49+ /// </summary>
50+ /// <param name="terminator">The record terminator to set</param>
51+ /// <returns>the <see cref="CsvParserBuilder"/></returns>
3252 public CsvParserBuilder RecordTerminator ( string terminator )
3353 {
3454 _parser . RecordTerminator = terminator ;
3555 return this ;
3656 }
3757
58+ /// <summary>
59+ /// Enables the detection of comments using the following comment indicators
60+ /// </summary>
61+ /// <param name="comments">The comment indicators to set</param>
62+ /// <returns>the <see cref="CsvParserBuilder"/></returns>
3863 public CsvParserBuilder EnableComments ( params string [ ] comments )
3964 {
4065 _parser . Comments = comments ;
4166 return this ;
4267 }
4368
69+ /// <summary>
70+ /// Enables multi line records
71+ /// </summary>
72+ /// <returns>the <see cref="CsvParserBuilder"/></returns>
4473 public CsvParserBuilder EnableMultiline ( )
4574 {
4675 _parser . IsMultilineEnabled = true ;
4776 return this ;
4877 }
4978
79+ /// <summary>
80+ /// Allow unquoted whitespace characters
81+ /// </summary>
82+ /// <returns>the <see cref="CsvParserBuilder"/></returns>
5083 public CsvParserBuilder AllowUnquotedWhitespace ( )
5184 {
5285 _parser . IsWhitespaceAllowed = true ;
5386 return this ;
5487 }
5588
89+ /// <summary>
90+ /// Allow unquoted quotes
91+ /// </summary>
92+ /// <returns>the <see cref="CsvParserBuilder"/></returns>
5693 public CsvParserBuilder AllowUnquotedQuotes ( )
5794 {
5895 _parser . UnquotedQuotesAllowed = true ;
5996 return this ;
6097 }
6198
99+ /// <summary>
100+ /// Always quote all field values
101+ /// </summary>
102+ /// <returns>the <see cref="CsvParserBuilder"/></returns>
62103 public CsvParserBuilder AlwaysQuote ( )
63104 {
64105 _parser . AlwaysQuote = true ;
65106 return this ;
66107 }
67108
109+ /// <summary>
110+ /// Builds the configuration about the record parser factory.
111+ /// </summary>
112+ /// <returns>The configuration for the record parser factory.</returns>
68113 public BeanConfig < IRecordParserFactory > Build ( )
69114 {
70115 var config = new BeanConfig < IRecordParserFactory > ( ( ) => _parser ) ;
0 commit comments