Skip to content

Commit

Permalink
Added notnull contrait for the key type. (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgernand authored Jun 1, 2022
1 parent 67e6c39 commit eb34549
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Fluxera.Entity/AggregateRoot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
[PublicAPI]
public abstract class AggregateRoot<TAggregateRoot, TKey> : Entity<TAggregateRoot, TKey>
where TAggregateRoot : AggregateRoot<TAggregateRoot, TKey>
where TKey : IComparable<TKey>, IEquatable<TKey>
where TKey : notnull, IComparable<TKey>, IEquatable<TKey>
{
}
}
2 changes: 1 addition & 1 deletion src/Fluxera.Entity/Entity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
[PublicAPI]
public abstract class Entity<TEntity, TKey>
where TEntity : Entity<TEntity, TKey>
where TKey : IComparable<TKey>, IEquatable<TKey>
where TKey : notnull, IComparable<TKey>, IEquatable<TKey>
{
/// <summary>
/// To ensure hashcode uniqueness, a carefully selected random number multiplier
Expand Down
2 changes: 1 addition & 1 deletion src/Fluxera.Entity/Fluxera.Entity.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<ItemGroup>
<PackageReference Include="Fluxera.ComponentModel.Annotations" Version="6.0.9" />
<PackageReference Include="Fluxera.Guards" Version="6.0.22" />
<PackageReference Include="Fluxera.StronglyTypedId" Version="6.0.3" />
<PackageReference Include="Fluxera.StronglyTypedId" Version="6.0.4" />
<PackageReference Include="GitVersion.MsBuild" Version="5.10.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down

0 comments on commit eb34549

Please sign in to comment.