Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #741 from moreal/store-tracker-logging-arguments-p…
…roperly Log all arguments in StoreTracker
- Loading branch information
Showing
4 changed files
with
89 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System; | ||
using System.Linq; | ||
|
||
namespace Libplanet.Tests.Store | ||
{ | ||
[Equals] | ||
public sealed class StoreTrackLog : IEquatable<StoreTrackLog> | ||
{ | ||
private StoreTrackLog(string method, object[] @params) | ||
{ | ||
Method = method; | ||
Params = @params; | ||
} | ||
|
||
public string Method { get; } | ||
|
||
public object[] Params { get; } | ||
|
||
public static StoreTrackLog Create(string method, params object[] @params) | ||
{ | ||
return new StoreTrackLog(method, @params); | ||
} | ||
|
||
public bool Equals(StoreTrackLog trackLog) | ||
{ | ||
return !(trackLog is null) && trackLog.Method == Method && | ||
trackLog.Params.SequenceEqual(Params); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters