Releases: recorefx/RecoreFX
Releases · recorefx/RecoreFX
v2.0.0
Breaking changes
- RecoreFX now targets .NET 5.0
- Removes
IReadOnlyDictionaryExtensions
, which contained two overloads ofGetValueOrDefault()
, preferring the now-standard method - Also removes
IDictionaryExtensions.GetValueOrDefault<TKey, TValue>(Dictionary<TKey, TValue>, TKey)
, which is no longer needed to resolve ambiguity Of<T>.Value
is now init-onlyToken
andCiphertext<THash>
are now record types instead of subtypes ofOf<string>
New features
- The API now has type annotations for nullable references
- Add
Apply()
andApplyAsync()
- Add
Equals()
overloads withIEqualityComparer<T>
forOptional<T>
,Either<TLeft, TRight>
, andResult<TValue, TResult>
- Add
ToAsyncEnumerable<T>(Task<IEnumerable<T>>)
andToAsyncEnumerable(IEnumerable<Task<T>>)
Bug fixes
- Fixed the equality and comparison methods of
Token
,MappedComparer
, andMappedEqualityComparer
so that they no longer throwNullReferenceException
when passednull
as an argument - Fixed
Of<T>.ToString()
not to throwNullReferenceException
when the underlying value isnull
v2.0.0 Release Candidate 2
2.0.0
Breaking changes
- RecoreFX now targets .NET 5.0
- Removes
IReadOnlyDictionaryExtensions
, which contained two overloads ofGetValueOrDefault()
, preferring the now-standard method - Also removes
IDictionaryExtensions.GetValueOrDefault<TKey, TValue>(Dictionary<TKey, TValue>, TKey)
, which is no longer needed to resolve ambiguity Of<T>.Value
is now init-only
New features
- The API now has type annotations for nullable references
- Add
Equals()
overloads withIEqualityComparer<T>
forOptional<T>
,Either<TLeft, TRight>
, andResult<TValue, TResult>
- Add
ToAsyncEnumerable<T>(Task<IEnumerable<T>>)
andToAsyncEnumerable(IEnumerable<Task<T>>)
Bug fixes
- Fixed the equality and comparison methods of
Token
,MappedComparer
, andMappedEqualityComparer
so that they no longer throwNullReferenceException
when passednull
as an argument - Fixed
Of<T>.ToString()
not to throwNullReferenceException
when the underlying value isnull
v2.0.0 Release Candidate 1
Breaking changes
- RecoreFX now targets .NET 5.0
- Removes
IReadOnlyDictionaryExtensions
, which contained two overloads ofGetValueOrDefault()
, preferring the now-standard method - Also removes
IDictionaryExtensions.GetValueOrDefault<TKey, TValue>(Dictionary<TKey, TValue>, TKey)
, which is no longer needed to resolve ambiguity Of<T>.Value
is now init-only
New features
- The API now has type annotations for nullable references
- Add
Equals()
overloads withIEqualityComparer<T>
forOptional<T>
,Either<TLeft, TRight>
, andResult<TValue, TResult>
- Add
ToAsyncEnumerable<T>(Task<IEnumerable<T>>)
andToAsyncEnumerable(IEnumerable<Task<T>>)
Bug fixes
- Fixed the equality and comparison methods of
Token
,MappedComparer
, andMappedEqualityComparer
so that they no longer throwNullReferenceException
when passednull
as an argument - Fixed
Of<T>.ToString()
not to throwNullReferenceException
when the underlying value isnull
v1.0.1
v1.0.0
First major release! This release is considered production-ready, and subsequent breaking changes will require bumping the major version.
Also, v0 is now frozen and will not be receiving any more updates.
This changelog lists the changes relative to v0.11.0.
Breaking changes
- Return
(TSource Argmax, TResult Max)
fromArgmax()
instead of(TResult Max, TSource Argmax)
; likewise forArgmin()
- Capitalize property names in the returned tuple for
Enumerate()
- Change the behavior of
Argmin()
andArgmax()
to matchMin()
andMax()
. Specifically:null
is never returned as the min or max unless all values in the input enumerable arenull
or the input enumerable's elements are of a nullable type and the enumerable is empty.- If either
TSource
orTResult
is non-nullable, theArgmin()
andArgmax()
of an empty enumerable will throwInvalidArgumentException
.
New features
- New
Optional.Of()
andOptional.Flatten()
overloads forNullable<T>
. These both work to prevent ending up with anOptional<Nullable<T>>
. - Add a
Collapse()
extension method forEither<T, T>.
andResult<T, T>
InvalidOperationException
s thrown from callingArgmin()
orArgmax()
on an empty enumerable now contain an error message.- Add a set of
Argmin()
andArgmax()
overloads for numeric types and the nullable versions of those types. This parallelsMin()
andMax()
and is needed for the null-handling behavior mentioned above. Specifically,null
is normally considered less than any number, but we want to avoid returning it as the minimum. - Add a set of
Argmin()
andArgmax()
overloads that do not take a selector function and simply return the index of the minimizing or maximizing element along with that element.
v0.11.0
Breaking changes
- Rename
ValueOrDefault()
toGetValueOrDefault()
inIDictionaryExtensions
andIReadOnlyDictionaryExtensions
- Remove from
Func
:Memoize()
,TupleArgs()
, andUntupleArgs()
- Serialize
AbsoluteUri
andRelativeUri
as JSON in the same way asUri
(as a string instead of property-by-property) - Remove
AnonymousComparer<T>
(covered byComparer<T>.Create()
) - In
Renumerable.OnKeys()
andOnValues()
, throwArgumentNullException
whenfunc
is null instead ofNullReferenceException
- Remove
LinkedListExtensions.Append()
(will resolve toICollectionExtions.Append()
as long as it is called through extension method syntax) - Remove
AbsoluteUri
's constructors for combining URIs - Change
AbsoluteUri.Combine()
to work the same asUri.ctor(Uri, Uri)
- Remove
RelativeUri.Combine()
v0.10.0
Breaking changes
- Change the callback in
Catcher.Catch
from a predicate to a mapping function - Rename
Result.Values()
andResult.Errors()
toResult.Successes()
andResult.Failures()
New features
- Add
Result.TryAsync()
andResult.AsyncCatcher
- Add
Optional<T>.AssertValue()
v0.9.0
Breaking changes
- Remove the
StringUtil
type and its methods.JoinLines()
was the only method on this type.
- Remove the
Lift
type and move its methods onto their respective types:Lift.OnEnumerable()
->Renumerable.Lift()
Lift.OnOptional()
->Optional.Lift()
Lift.OnEither()
->Either.Lift()
- This increases coherence and is a more extensible pattern.
- Move
Composer
andPipeline
into theSystem
namespace.- The
Recore.Functional
namespace has now been deleted.
This was the only namespace that didn't match an existingSystem
namespace.
- The
- Replace
Optional<T>
'sIEnumerable<T>
implementation withToEnumerable()
.- All of the
IEnumerable<T>
extension methods polluted IntelliSense and made it hard to figure out what you could actually do withOptional<T>
. - Iterating over
Optional<T>
's "elements" breaks its encapsulation and null safety in the same way that putting aValue
property on it would.
- All of the
New features
- Add support for serializing several types to and from JSON using
System.Text.Json
:Of<T>
Optional<T>
Either<T>
Result<T>
- Add
AnonymousComparer<T>
andAnonymousEqualityComparer<T>
.