summaryrefslogtreecommitdiff
path: root/CommandLineWrapper/JsonResults/Implements/StatusResult.cs
blob: aba2c25ca1bf3242cc126d232bd19b3967bfcb0a (plain)
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
using CommandLineWrapper;
using CommandLineWrapper.JsonResults;

public class StatusResultGetter : JsonResultGetter<StatusResult>
{
    protected override Task<JVCSCommandInvoker.InvokeResult> ExecCommand(JVCSWorkspace workspace)
        => workspace.Status();
}

public struct StatusResult
{
    public List<string> Created { get; set; }
    public List<string> Lost { get; set; }
    public List<string> Erased { get; set; }
    public List<MovedItem> Moved { get; set; }
    public List<ModifiedItem> Modified { get; set; }
}

public enum ModifiedType
{
    Modified,
    ModifiedButBaseVersionMismatch,
    ModifiedButNotHeld,
}

public struct MovedItem
{
    public string From { get; set; }
    public string To { get; set; }
}

public struct ModifiedItem
{
    public string Path { get; set; }
    public ModifiedType ModificationType { get; set; }
}