Skip to content

Commit

Permalink
We do not limit TLinkAddress to be just struct.
Browse files Browse the repository at this point in the history
  • Loading branch information
Konard committed Feb 1, 2022
1 parent 681218d commit 98d7a3f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions csharp/Platform.Data/WriteHandlerState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Platform.Data
{
public struct WriteHandlerState<TLinkAddress> where TLinkAddress : struct
public struct WriteHandlerState<TLinkAddress>
{
private readonly EqualityComparer<TLinkAddress> _equalityComparer;
public TLinkAddress Result;
Expand Down Expand Up @@ -33,7 +33,10 @@ public void Apply(TLinkAddress result)

public TLinkAddress Handle(IList<TLinkAddress> before, IList<TLinkAddress> after)
{
Apply(Handler?.Invoke(before, after) ?? Result);
if (Handler != null)
{
Apply(Handler(before, after));
}
return Result;
}
}
Expand Down

0 comments on commit 98d7a3f

Please sign in to comment.