Skopka.Abstraction.OperationResult
0.2.0
dotnet add package Skopka.Abstraction.OperationResult --version 0.2.0
NuGet\Install-Package Skopka.Abstraction.OperationResult -Version 0.2.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="Skopka.Abstraction.OperationResult" Version="0.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Skopka.Abstraction.OperationResult" Version="0.2.0" />
<PackageReference Include="Skopka.Abstraction.OperationResult" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Skopka.Abstraction.OperationResult --version 0.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Skopka.Abstraction.OperationResult, 0.2.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.
#:package Skopka.Abstraction.OperationResult@0.2.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Skopka.Abstraction.OperationResult&version=0.2.0
#tool nuget:?package=Skopka.Abstraction.OperationResult&version=0.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Skopka.Abstraction.OperationResult
Lightweight OperationResult / OperationResult<T> primitives for representing success/failure outcomes with structured errors and composable extensions.
Install
dotnet add package Skopka.Abstraction.OperationResult
Quick start
OperationResult<Guid> CreateUser(string name)
{
if (string.IsNullOrWhiteSpace(name))
return OperationResultFactory.Fail<Guid>(
new Error(ErrorCodes.ValidationRequired, "Name is required", ErrorType.Validation));
return OperationResultFactory.Success(Guid.NewGuid());
}
var id = CreateUser("John")
.Tap(x => Console.WriteLine($"Created: {x}"))
.Match(ok => ok, fail => Guid.Empty);
Documentation
documentation/OperationResult.md(in the repository)
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- No dependencies.
NuGet packages (4)
Showing the top 4 NuGet packages that depend on Skopka.Abstraction.OperationResult:
| Package | Downloads |
|---|---|
|
Skopka.Hello
Composition facade and host contracts for Skopka.Hello. |
|
|
Skopka.Identity.Abstractions
Public contracts, user models, commands and extension points for Skopka.Identity. |
|
|
Skopka.Hello.Endpoints
Minimal API endpoints and HTTP contracts for Skopka.Hello. |
|
|
Skopka.Abstraction
Meta-package that references all Skopka.Abstraction packages. |
GitHub repositories
This package is not used by any popular GitHub repositories.