Add costructors to LineParser.
This commit is contained in:
parent
85800ebd75
commit
cfbf3c7859
@ -55,8 +55,7 @@ namespace Tests
|
||||
[Test]
|
||||
public void ParseLineWithQuotesAndPunctuation()
|
||||
{
|
||||
LineParser lp = new LineParser();
|
||||
lp.Line = "this-is \"a , simple ;\" line";
|
||||
LineParser lp = new LineParser("this-is \"a , simple ;\" line");
|
||||
Assert.AreEqual("this-is", lp.Fields[0]);
|
||||
Assert.AreEqual("a , simple ;", lp.Fields[1]);
|
||||
Assert.AreEqual("line", lp.Fields[2]);
|
||||
|
@ -56,6 +56,25 @@ namespace zaaReloaded2.Dictionaries
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a LineParser object without a line.
|
||||
/// </summary>
|
||||
public LineParser() { }
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a LineParser object with an initial <paramref name="line"/>.
|
||||
/// </summary>
|
||||
/// <param name="line">Initial line to parse.</param>
|
||||
public LineParser(string line)
|
||||
: this()
|
||||
{
|
||||
Line = line;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private methods
|
||||
|
||||
void ParseLine()
|
||||
|
Loading…
Reference in New Issue
Block a user