Skip to content

Commit d0c5b33

Browse files
committed
IComparable
1 parent c6ca809 commit d0c5b33

File tree

208 files changed

+741
-35
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

208 files changed

+741
-35
lines changed

src/StronglyTypedIds/Templates/Guid/Guid_Base.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
 readonly partial struct TESTID : INTERFACES
1+
 [System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1036:Override methods on comparable types")]
2+
readonly partial struct TESTID : INTERFACES
23
{
34
public System.Guid Value { get; }
45

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
 public int CompareTo(TESTID other) => Value.CompareTo(other.Value);
1+

2+
#pragma warning disable CA1036
3+
public int CompareTo(TESTID other) => Value.CompareTo(other.Value);
4+
#pragma warning restore CA1036

src/StronglyTypedIds/Templates/Int/Int_Base.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
 readonly partial struct TESTID : INTERFACES
1+
 [System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1036:Override methods on comparable types")]
2+
readonly partial struct TESTID : INTERFACES
23
{
34
public int Value { get; }
45

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
 public int CompareTo(TESTID other) => Value.CompareTo(other.Value);
1+

2+
#pragma warning disable CA1036
3+
public int CompareTo(TESTID other) => Value.CompareTo(other.Value);
4+
#pragma warning restore CA1036

src/StronglyTypedIds/Templates/Long/Long_Base.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
 readonly partial struct TESTID : INTERFACES
1+
 [System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1036:Override methods on comparable types")]
2+
readonly partial struct TESTID : INTERFACES
23
{
34
public long Value { get; }
45

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
 public int CompareTo(TESTID other) => Value.CompareTo(other.Value);
1+

2+
#pragma warning disable CA1036
3+
public int CompareTo(TESTID other) => Value.CompareTo(other.Value);
4+
#pragma warning restore CA1036

src/StronglyTypedIds/Templates/NewId/NewId_Base.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
 readonly partial struct TESTID : INTERFACES
1+
 [System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1036:Override methods on comparable types")]
2+
readonly partial struct TESTID : INTERFACES
23
{
34
public MassTransit.NewId Value { get; }
45

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
 public int CompareTo(TESTID other) => Value.CompareTo(other.Value);
1+
 #pragma warning disable CA1036
2+
public int CompareTo(TESTID other) => Value.CompareTo(other.Value);
3+
#pragma warning restore CA1036

src/StronglyTypedIds/Templates/NullableString/NullableString_Base.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
 readonly partial struct TESTID : INTERFACES
1+
 [System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1036:Override methods on comparable types")]
2+
readonly partial struct TESTID : INTERFACES
23
{
34
public string? Value { get; }
45

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
 public int CompareTo(TESTID other)
1+
#pragma warning disable CA1036
2+
public int CompareTo(TESTID other)
23
{
34
return (Value, other.Value) switch
45
{
@@ -7,4 +8,5 @@
78
(_, null) => 1,
89
(_, _) => Value.CompareTo(other.Value),
910
};
10-
}
11+
}
12+
#pragma warning restore CA1036

0 commit comments

Comments
 (0)