NCoreUtils.Maybe
3.4.0
dotnet add package NCoreUtils.Maybe --version 3.4.0
NuGet\Install-Package NCoreUtils.Maybe -Version 3.4.0
<PackageReference Include="NCoreUtils.Maybe" Version="3.4.0" />
<PackageVersion Include="NCoreUtils.Maybe" Version="3.4.0" />
<PackageReference Include="NCoreUtils.Maybe" />
paket add NCoreUtils.Maybe --version 3.4.0
#r "nuget: NCoreUtils.Maybe, 3.4.0"
#:package NCoreUtils.Maybe@3.4.0
#addin nuget:?package=NCoreUtils.Maybe&version=3.4.0
#tool nuget:?package=NCoreUtils.Maybe&version=3.4.0
Generalized nullable value representation.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| .NET Framework | net461 is compatible. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6.1
- NCoreUtils.Extensions.Preconditions (>= 10.0.0.1)
- NCoreUtils.Maybe.Analyzers (>= 3.4.0)
- System.ValueTuple (>= 4.5.0)
-
.NETStandard 2.1
- NCoreUtils.Extensions.Preconditions (>= 10.0.0.1)
- NCoreUtils.Maybe.Analyzers (>= 3.4.0)
-
net10.0
- NCoreUtils.Extensions.Preconditions (>= 10.0.0.1)
- NCoreUtils.Maybe.Analyzers (>= 3.4.0)
-
net6.0
- NCoreUtils.Extensions.Preconditions (>= 10.0.0.1)
- NCoreUtils.Maybe.Analyzers (>= 3.4.0)
-
net8.0
- NCoreUtils.Extensions.Preconditions (>= 10.0.0.1)
- NCoreUtils.Maybe.Analyzers (>= 3.4.0)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on NCoreUtils.Maybe:
| Package | Downloads |
|---|---|
|
NCoreUtils.Linq.Extensions
Linq extensions. |
|
|
NCoreUtils.Data.Abstractions
Data entity repository abstraction. |
|
|
NCoreUtils.Data.Protocol
Data query protocol implementation. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Fixes:
- Aggregate, ToEnumerable, ToList and ToArray returned the opposite result (value for empty, nothing for non-empty).
- MaybeMax returned the minimum for HashSet and general IEnumerable sources.
- Enumerators of general IEnumerable sources were not disposed.
- As<TDerived>() turned Just(null) into an empty value; it now returns Just(null) if TDerived can hold null.
Changes:
- GetOrDefault() returns T? while GetOrDefault(defaultValue) returns T (no longer nullable).
- ToString() returns an empty string instead of null.
- GetHashCode of Maybe and MinMax distinguishes empty, Just(null) and common values (e.g. Just(0)).
- Pick throws an exception with a descriptive message if no value was picked.
- Equals(other, comparer) accepts a null comparer (uses the default comparer).
- MinMax supports deconstruction (Deconstruct); Destruct is obsolete.
- net461: System.Memory is no longer a dependency.
Analyzers (NCoreUtils.Maybe.Analyzers, referenced automatically):
- NCMAYBE001: As<T>() with a non-nullable target on a nullable source, with code fix.
- NCMAYBE002: null literal converted to Maybe<T> (results in an empty value), with code fix.