forked from LogExperts/LogExpert
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathColumnizerCallback.cs
More file actions
55 lines (39 loc) · 1.02 KB
/
ColumnizerCallback.cs
File metadata and controls
55 lines (39 loc) · 1.02 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
52
53
54
55
using LogExpert.Core.Interface;
namespace LogExpert.Core.Callback;
public class ColumnizerCallback(ILogWindow logWindow) : ILogLineColumnizerCallback, IAutoLogLineColumnizerCallback, ICloneable
{
#region Fields
private readonly ILogWindow _logWindow = logWindow;
#endregion
#region Properties
public int LineNum { get; set; }
#endregion
#region cTor
private ColumnizerCallback(ColumnizerCallback original) : this(original._logWindow)
{
LineNum = original.LineNum;
}
#endregion
#region Public methods
public object Clone()
{
return new ColumnizerCallback(this);
}
public string GetFileName()
{
return _logWindow.GetCurrentFileName(LineNum);
}
public ILogLine GetLogLine(int lineNum)
{
return _logWindow.GetLine(lineNum);
}
public int GetLineCount()
{
return _logWindow.LogFileReader.LineCount;
}
public void SetLineNum(int lineNum)
{
LineNum = lineNum;
}
#endregion
}