- fix over-advance in
ErrorState-andOptionJsonConverter - add
ArraySegmentfast path toOptionLinqExtensions - exclude custom
Listimplementations from the span fast path inOptionLinqExtensions
- generalize
AmOptional003to switch expressions (#44) - remove obsolete tuple operations (use
Join#37) - reuse default exceptions for
Result<T>andErrorState - add span fast path to many
OptionLinqExtensions - updated TUnit to 1.56.18
OptionsMarshallunsafe creation APIMake{Option|Result}SuccessUnsafeMake{Result|ErrorState}ErrorUnsafe
- add
ValuesIntoOrFirstError(#45) - loosen
ValuesInto...linq extensions fromIList<T>toICollection<T> - add
MatchforOption<(T1, T2)>andResult<(T1, T2){, T}>with a nicer delegate (for up to 5 elements in the tuple) (#37) - updated TUnit to 1.33.0
- drop .NET 9
- add
Joinfor nullable types - add
Joinfor 5 elements - add
MapandConsumeforOption<(T1, T2)>andResult<(T1, T2){, T}>with a nicer delegate (for up to 5 elements in the tuple) (#37)- if this concept works more operations will follow in the 0.4 release cycle
- remove obsolete
OptionsMarshall.TryGetValueandTryGetError(useBranch#31) - remove experimental
Consumefor(Result<T, E>, Result<T, E>)(useJoin#37) - updated TUnit to 1.24.13
- add
IEnumerable<Option<T>>.ValuesIntoOrError - add
IEnumerable<T>.TryFirst(predicate) - add
ReadOnlySpan<T>.TryIndexOfAny - add
OrThrow(arg, messageSupplier) - add
ErrorState{<E>}.ToResult(Func<Result<T{, E}>>) - add
ErrorState{<E>}.ToResultAsync(Func<Task<Result<T{, E}>>>) - make
TryIndexOfandTryLastIndexOfgeneric - mark obsolete
OptionsMarshall.TryGetValueandTryGetErroras errors (will be removed after 0.3.2) - updated TUnit to 1.19.16
TryLastIndexOfforReadOnlySpan<char>ConsumeAsyncfor(Option<T>, Option<T>)and(Result<T>, Result<T>)- improve error messages for
Result<FileSystemInfo>.RequireExists - inform to not use
defaultkeyword to createOption(AmOptional010) - improve
AmOptional001with generics - updated TUnit to 1.3.15
- improved Option joining (#37)
JoinAPI forOption<T>,Result<T>andResult<T, E>up to 4 elements (after that it starts nesting)Result/ErrorState.CombineErrorsAPIMapfor(Result<T>, Result<T>)and(Result<T, E>, Result<T, E>)MapandConsumeextensions for tuples overloads with an argument parameter- experimental
Consumefor(Result<T, E>, Result<T, E>)
- improved LINQ integration (#32)
WhereSuccessWhereErrorBranchfor sequences ofResult<T>andResult<T, E>- splits the sequence into two lists, one for values and one for errors (only enumerates once)
ValuesOrFirstErrorfor sequences ofResult<T>andResult<T, E>ValuesOrErrorfor sequences ofOption<T>- rename
IEnumerable<T>.FirstOrErrortoTryFirst
Oroverloads with an argumentOption.ToResultandErrorState.ToResultoverloads with an argumentTryIndexOfforReadOnlySpan<char>SpanParsableGeneratorimprovements- improved exception message
- fixed nesting in static classes
- fixed
AmOptional008not triggering
- fixed missing default values in generated async extension methods
- warning for empty
Consumecalls (AmOptional009) - improvements to Wrong conditional return type (AmOptional003) analyzer
- (TUnit)
IsSuccess(condition)forOption<T>Result<T>andResult<T, E> - (TUnit)
IsError(condition)forResult<T>,Result<T, E>,ErrorStateandErrorState<E> - updated TUnit to 1.0.48
- minor
SpanParsableGeneratorfixes- add analyzer rule (
AmOptional008)
- add analyzer rule (
- (net10) add
TryParseextension to allIParsableandISpanParsable
- add
SpanParsableGenerator- add
GenerateISpanParsableAttributeto any type implementingIOptionSpanParsableto generate theISpanParsableimplementation
- add
- updated TUnit to 0.90.45
- add
As<T>operation for save up-casting (#33) - add a basic analyzer to detect misusage
- made implicit
Exception/TErrortoResult/ErrorStateconversions not nullable- if you really need nullable exceptions
Result/ErrorState.Errorstill acceptsException? - for
TErroryou need to provide a default error
- if you really need nullable exceptions
- updated TUnit to 0.73.4
- add
BranchOperation (replacesOptionsMarshall.TryGetValueandTryGetError) - add
Consume/Match/Require/Rejectoverloads with an argument (#26) - add
ErrorState.Try(#30) - add
Result.Tryoverload with an argument (#26, #30) - removed
ToOptionandToResultextensions on arbitary objects- use
Option.OforResult.Of
- use
- fix nullability of error action in a
ConsumeAsyncoverload - updated TUnit to 0.57.24
- added
Or{Throw}Async(#24) - added
OrThrowwith custom message (#23) - added
Option<T>.ToResultAsync - added
Result<T{, E}>.To{Option|ErrorState}Async - added
ErrorState{<E>}.ToResult(Async) - added
DisposeAsyncextension methods - made
Result<TValue>toResult<TValue, Exception>explicit to prevent accidential conversions - marked all custom exceptions as
System.Serializable(#22) - deprecated
ToOptionandToResulton arbitary objects (they are more annoying than helpful) - removed obsolete
{Try}Map{Async}overloads that took an error map- replaced by
MapError(#19)
- replaced by
- introduced a generator for some async extension methods. please report any breaking changes you encounter with async!
- updated TUnit to 0.25.21
- added
{Try}Map{Error}overloads with one argument (#21) - added
RequireExistsforResult<FileSystemInfo, Error> - added
RequireExistsoverload with custom error forResult<FileSystemInfo> - added
ZipArchive.TryGetEntryreturning an option - updated TUnit to 0.24.0
- added
.MapError()(#19)- (replaces
.Map(map, errorMap)overloads)
- (replaces
- added
Match{Async}API (#18)- (replaces
MapforOption,ErrorState<T>andErrorState)
- (replaces
- added custom exceptions for
.OrThrow() - removed obsolete
Where{Not}. UseRequire/Rejectinstead. - updated TUnit to 0.19.148
- moved nullable extensions to
Ametrin.Optional.Numerics - updated TUnit to 0.18.9
- removed obsolete
{Try}Selectuse{Try}Mapinstead