-
Notifications
You must be signed in to change notification settings - Fork 386
Expand file tree
/
Copy pathConflict.cs
More file actions
86 lines (75 loc) · 2.03 KB
/
Conflict.cs
File metadata and controls
86 lines (75 loc) · 2.03 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
using System.Collections.Generic;
namespace SourceGit.Models
{
public enum ConflictPanelType
{
Ours,
Theirs,
Result
}
public enum ConflictResolution
{
None,
UseOurs,
UseTheirs,
UseBothMineFirst,
UseBothTheirsFirst,
}
public enum ConflictLineType
{
None,
Common,
Marker,
Ours,
Theirs,
}
public enum ConflictLineState
{
Normal,
ConflictBlockStart,
ConflictBlock,
ConflictBlockEnd,
ResolvedBlockStart,
ResolvedBlock,
ResolvedBlockEnd,
}
public class ConflictLine
{
public ConflictLineType Type { get; set; } = ConflictLineType.None;
public string Content { get; set; } = string.Empty;
public string LineNumber { get; set; } = string.Empty;
public ConflictLine()
{
}
public ConflictLine(ConflictLineType type, string content)
{
Type = type;
Content = content;
}
public ConflictLine(ConflictLineType type, string content, int lineNumber)
{
Type = type;
Content = content;
LineNumber = lineNumber.ToString();
}
}
public record ConflictSelectedChunk(
double Y,
double Height,
int ConflictIndex,
ConflictPanelType Panel,
bool IsResolved
);
public class ConflictRegion
{
public int StartLineInOriginal { get; set; }
public int EndLineInOriginal { get; set; }
public string StartMarker { get; set; } = "<<<<<<<";
public string SeparatorMarker { get; set; } = "=======";
public string EndMarker { get; set; } = ">>>>>>>";
public List<string> OursContent { get; set; } = new();
public List<string> TheirsContent { get; set; } = new();
public bool IsResolved { get; set; } = false;
public ConflictResolution ResolutionType { get; set; } = ConflictResolution.None;
}
}