Skip to content

Commit 89cccdc

Browse files
more enums
1 parent 4c92193 commit 89cccdc

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

src/Dap.Protocol/Models/ChecksumAlgorithm.cs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,12 @@ namespace OmniSharp.Extensions.DebugAdapter.Protocol.Models
77
/// <summary>
88
/// Names of checksum algorithms that may be supported by a debug adapter.
99
/// </summary>
10-
[JsonConverter(typeof(StringEnumConverter))]
11-
public enum ChecksumAlgorithm
12-
{
13-
Md5, Sha1, Sha256, Timestamp
14-
}
15-
1610
[StringEnum]
17-
public readonly partial struct PathFormat
11+
public readonly partial struct ChecksumAlgorithm
1812
{
19-
public static PathFormat Path { get; } = new PathFormat("path");
20-
public static PathFormat Uri { get; } = new PathFormat("uri");
13+
public static ChecksumAlgorithm Md5 { get; } = new ChecksumAlgorithm("MD5");
14+
public static ChecksumAlgorithm Sha1 { get; } = new ChecksumAlgorithm("SHA1");
15+
public static ChecksumAlgorithm Sha256 { get; } = new ChecksumAlgorithm("SHA256");
16+
public static ChecksumAlgorithm Timestamp { get; } = new ChecksumAlgorithm("timestamp");
2117
}
2218
}

src/Dap.Protocol/Models/PathFormat.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
using OmniSharp.Extensions.JsonRpc.Generation;
2+
3+
namespace OmniSharp.Extensions.DebugAdapter.Protocol.Models
4+
{
5+
[StringEnum]
6+
public readonly partial struct PathFormat
7+
{
8+
public static PathFormat Path { get; } = new PathFormat("path");
9+
public static PathFormat Uri { get; } = new PathFormat("uri");
10+
}
11+
}

0 commit comments

Comments
 (0)