-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathFlatFileErrorContext.cs
More file actions
51 lines (46 loc) · 1.44 KB
/
Copy pathFlatFileErrorContext.cs
File metadata and controls
51 lines (46 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
namespace FlatFile.Core.Base
{
using System;
/// <summary>
/// Provides information about a file parsing error.
/// </summary>
public struct FlatFileErrorContext
{
private readonly string line;
private readonly int lineNumber;
private readonly Exception exception;
/// <summary>
/// Initializes a new instance of <see cref="FlatFileErrorContext"/>.
/// </summary>
/// <param name="line">The content of the line on which the error occurred.</param>
/// <param name="lineNumber">The line numer at which the error occurred.</param>
/// <param name="exception">The error that occurred.</param>
public FlatFileErrorContext(string line, int lineNumber, Exception exception)
{
this.line = line;
this.lineNumber = lineNumber;
this.exception = exception;
}
/// <summary>
/// The content of the line on which the error occurred.
/// </summary>
public string Line
{
get { return line; }
}
/// <summary>
/// The line numer at which the error occurred.
/// </summary>
public int LineNumber
{
get { return lineNumber; }
}
/// <summary>
/// The error that occurred.
/// </summary>
public Exception Exception
{
get { return exception; }
}
}
}