Skip to content

Releases: jscarle/LightResults

v8.0.9 - Really final release for .NET 8.0

27 Feb 23:40
bf135ce
Compare
Choose a tag to compare
  • Improved performance.
  • Reduced interface on result.Errors down to IReadOnlyCollection<T>.
  • Added dedicated property result.Error for direct access to first error in a failed result.

This is the really final release for .NET 8.0.

v8.0.8 - Final release for .NET 8.0

20 Feb 18:36
7c3bb49
Compare
Choose a tag to compare
  • Moved IActionableResult into the LightResults.Common namespace.

This is the final release for .NET 8.0.

v8.0.7 - Further improved performance

20 Feb 17:49
5766e71
Compare
Choose a tag to compare
  • Further improved performance of ToString() methods.

See the full performance comparison.

v8.0.6 - Improved performance

18 Feb 16:33
058f164
Compare
Choose a tag to compare
  • Improved performance significantly.
BenchmarkDotNet v0.13.12, Windows 11 (10.0.22631.3155/23H2/2023Update/SunValley3)
13th Gen Intel Core i7-13700KF, 1 CPU, 24 logical and 16 physical cores
.NET SDK 8.0.200
  [Host]     : .NET 8.0.2 (8.0.224.6711), X64 RyuJIT AVX2
  DefaultJob : .NET 8.0.2 (8.0.224.6711), X64 RyuJIT AVX2
  Iterations : 100 000
Method Before After Difference Before After Difference
ResultBase.Errors[0] 51.91 μs 27.53 μs 89% faster - - No change
ResultBase.HasError<IError>() 4,839.80 μs 94.39 μs 5027% faster 12.21 MB - Eliminated
Result.Ok() 168.40 μs 18.77 μs 797% faster 2.29 MB - Eliminated
Result.Fail() 1,195.60 μs 18.88 μs 6233% faster 12.21 MB - Eliminated
Result.Fail(IError) 1,029.60 μs 535.76 μs 92% faster 9.16 MB 7.63 MB 17% less
Result.Ok<TValue>(TValue) 195.30 μs 196.74 μs No change 3.05 MB 3.05 MB No change
Result.Fail<TValue>() 1,251.30 μs 19.06 μs 6465% faster 12.97 MB - Eliminated
Result.Fail<TValue>(IError) 1,013.10 μs 558.52 μs 81% faster 9.92 MB 8.39 MB 15% less
Result<TValue>.Ok(TValue) 196.30 μs 192.23 μs No change 3.05 MB 3.05 MB No change
Result<TValue>.Fail() 1,225.40 μs 19.04 μs 6336% faster 12.97 MB - Eliminated
Result<TValue>.Fail(IError) 1,018.30 μs 575.66 μs 77% faster 9.92 MB 8.39 MB 15% less
new Error() 225.80 μs 223.80 μs No change 3.05 MB 3.05 MB No change
new Error(errorMessage) 224.40 μs 225.02 μs No change 3.05 MB 3.05 MB No change

v8.0.5 - Improved usability

15 Feb 22:09
75a2c97
Compare
Choose a tag to compare
  • Added the first error message when available to the ToString() of failed results.
  • Reverted the IResult.Errors property back to IReadOnlyList<IError> from IReadOnlyCollection<IError> for better performance.

v8.0.4 - Improved performance and usability

14 Feb 21:00
7388ef9
Compare
Choose a tag to compare
  • Changed the IResult.Errors property from IReadOnlyList<IError> to IReadOnlyCollection<IError>.
  • Improved the performance of ResultBase.ToString().
  • Added Result<TValue>.ToString() in order to include the value when the TValue is a primitive type.
  • Added new Result.Fail overloads:
    • Result.Fail(string errorMessage, (string Key, object Value) metadata)
    • Result.Fail(string errorMessage, IDictionary<string, object> metadata)
    • Result.Fail<TValue>(string errorMessage, (string Key, object Value) metadata)
    • Result.Fail<TValue>(string errorMessage, IDictionary<string, object> metadata)
    • Result<TValue>.Fail(string errorMessage, (string Key, object Value) metadata)
    • Result<TValue>.Fail(string errorMessage, IDictionary<string, object> metadata)
  • Used FrozenDictionary instead of ImmutableDictionary for metadata in .NET 8.0.
  • Updated project dependencies.