Skip to content

Latest commit

 

History

History
57 lines (38 loc) · 1.39 KB

CHANGELOG.md

File metadata and controls

57 lines (38 loc) · 1.39 KB

Changelog

All notable changes to this project are documented in this file.

[1.10.0] - 2024-02-14

Added

  • ErrorType.Forbidden
  • README to NuGet package

[1.9.0] - 2024-01-06

Added

  • ToErrorOr

[2.0.0] - 2024-03-26

Added

  • FailIf
public ErrorOr<TValue> FailIf(Func<TValue, bool> onValue, Error error)
ErrorOr<int> errorOr = 1;
errorOr.FailIf(x => x > 0, Error.Failure());

Breaking Changes

  • Then that receives an action is now called ThenDo
-public ErrorOr<TValue> Then(Action<TValue> action)
+public ErrorOr<TValue> ThenDo(Action<TValue> action)
-public static async Task<ErrorOr<TValue>> Then<TValue>(this Task<ErrorOr<TValue>> errorOr, Action<TValue> action)
+public static async Task<ErrorOr<TValue>> ThenDo<TValue>(this Task<ErrorOr<TValue>> errorOr, Action<TValue> action)
  • ThenAsync that receives an action is now called ThenDoAsync
-public async Task<ErrorOr<TValue>> ThenAsync(Func<TValue, Task> action)
+public async Task<ErrorOr<TValue>> ThenDoAsync(Func<TValue, Task> action)
-public static async Task<ErrorOr<TValue>> ThenAsync<TValue>(this Task<ErrorOr<TValue>> errorOr, Func<TValue, Task> action)
+public static async Task<ErrorOr<TValue>> ThenDoAsync<TValue>(this Task<ErrorOr<TValue>> errorOr, Func<TValue, Task> action)