SaferVariants 1.8.0

There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package SaferVariants --version 1.8.0
NuGet\Install-Package SaferVariants -Version 1.8.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SaferVariants" Version="1.8.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SaferVariants --version 1.8.0
#r "nuget: SaferVariants, 1.8.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install SaferVariants as a Cake Addin
#addin nuget:?package=SaferVariants&version=1.8.0

// Install SaferVariants as a Cake Tool
#tool nuget:?package=SaferVariants&version=1.8.0

An alternative to returning null and throwing exceptions as indications of a value being present and errors occurring.

The only purpose of this library is to (to the extent that it is possible) force checking if a value is present/ok before using it.

Currently, the way that that is achieved is by having an interface that can either be pattern matched against to get access to the value or by calling the methods that explicitly handle the case where the value is not present.

Inspired by the programming language Rust.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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 was computed.  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. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.1

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.0.0-alpha1 95 4/1/2023
1.8.0 383 7/21/2021
1.7.0 323 7/20/2021
1.6.0 751 5/10/2021
1.5.0 305 5/10/2021
1.4.0 310 5/9/2021
1.3.0 298 5/6/2021
1.2.0 333 5/1/2021
1.1.0 298 4/28/2021
1.0.0 305 4/23/2021

Adds the following async extension methods to IOption and IResult:
* HandleErrorAsync
* ThenAsync

These are found in the namespace SaferVariants.AsyncExtensions