Repository navigation
v2.0.0.4127
What's Changed
Major release — contains breaking changes. See migration-guide.md for full before/after porting steps.
Breaking changes
- [DEV] - (RzR) -> Change namespace from
AggregatedGenericResultMessagetoRzR.ResultMessage. - [FIX] - (RzR) -> Implicit
Exception -> Result/Result<T>operators now throwArgumentNullExceptiononnull(was: silent empty failure). - [FIX] - (RzR) ->
Result<T>(Exception)constructor now adds oneMessageType.Exceptionmessage (was: two: empty info + trace). - [FIX] - (RzR) ->
JoinErrors(IEnumerable<Result>)now derivesIsSuccessfrom the joined collection (was: inherited from caller). - [FIX] - (RzR) ->
Success<T>(T, params RelatedObjectModel[])no longer adds a ghostMessageType.Nonemessage whenrelatedObjectsis empty/null. - [DEV] - (RzR) ->
ExceptionHelper.PreserveStackTracesignature changed:void->ExceptionDispatchInfo - [DEV] - (RzR) ->
GetFirstMessage/GetFirstErrornow fall back to the first exception message when no plain message exists (was: empty string).
Obsoletions (compile warnings; will fail with TreatWarningsAsErrors)
- [DEV] - (RzR) ->
Result<T>.Instance-> useResult<T>.Create(). - [DEV] - (RzR) ->
ActionOnSuccess/ActionOnFailure/ActionOn(4 overloads) -> useTap/Match. - [DEV] - (RzR) -> All 7
FunctionOn*/ExecuteFunctionoverloads takingFunc<Task<TResult>>-> useFunctionExtensionsAsync.*Async(avoids sync-over-async deadlock).
- [DEV] - (RzR) ->
Map<TOut>(Func<T,TOut>),Bind<TOut>(Func<T,Result<TOut>>),Match<TOut>(Func<T,TOut>, Func<Result<T>,TOut>),Tap(Action<T>). - [DEV] - (RzR) ->
MapAsync,BindAsync,TapAsync,MatchAsync, overloads on bothResult<T>andTask<Result<T>>, accepting sync and async delegates. AllConfigureAwait(false). - [DEV] - (RzR) ->
Tap(this Task<Result<T>>, Action<T>)for sync side-effect on awaited results. - [DEV] - (RzR) -> New static class
FunctionExtensionsAsyncexposingFunctionOnSuccessAsync,FunctionOnFailureAsync,FunctionOnAsync(4 overloads),ExecuteFunctionAsync. - [DEV] - (RzR) ->
Validate(Func<T,bool>, error)- accumulates every violation in one chain pass; overloads for(predicate, key, error)and(predicate, MessageDataModel). - [DEV] - (RzR) ->
Ensure(Func<T,bool>, error)— short-circuits onceIsSuccess == false. - [DEV] - (RzR) ->
ValidateAsync— async predicate on bothResult<T>andTask<Result<T>>. - [DEV] - (RzR) -> Match(Func<IResult,TOut>, Func<IResult,TOut>)
and parameterless /Action`-based overloads. - [DEV] - (RzR) ->
MatchAsync<TOut>(Func<IResult,Task<TOut>>, Func<IResult,Task<TOut>>). - [FIX] - (RzR) ->
RelatedObjectModel.ToString()is now null-safe whenInDataSourceNamesisnull
Full Changelog: v1.4.1.8497...v2.0.0.4127