Skip to content

Commit 68c5894

Browse files
committed
Fixed compiler warnings for net8 target
1 parent 9c7f7a9 commit 68c5894

File tree

1 file changed

+6
-1
lines changed
  • src/Foundatio.Repositories

1 file changed

+6
-1
lines changed

src/Foundatio.Repositories/Id.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@
55

66
namespace Foundatio.Repositories;
77

8+
#if NETSTANDARD
89
public struct Id : IEquatable<Id>
10+
#else
11+
public record struct Id
12+
#endif
913
{
10-
1114
public static readonly Id Null = new();
1215

1316
public Id(string id, string routing = null)
@@ -30,6 +33,7 @@ public override string ToString()
3033
return String.Concat(Routing, "-", Value);
3134
}
3235

36+
#if NETSTANDARD
3337
public bool Equals(Id other)
3438
{
3539
if (ReferenceEquals(null, other)) return false;
@@ -61,6 +65,7 @@ public override int GetHashCode()
6165
{
6266
return !Equals(left, right);
6367
}
68+
#endif
6469
}
6570

6671
public class Ids : List<Id>

0 commit comments

Comments
 (0)