DotNetCore.Results
17.58.0
.NET 7.0
dotnet add package DotNetCore.Results --version 17.58.0
NuGet\Install-Package DotNetCore.Results -Version 17.58.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="DotNetCore.Results" Version="17.58.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DotNetCore.Results --version 17.58.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: DotNetCore.Results, 17.58.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 DotNetCore.Results as a Cake Addin
#addin nuget:?package=DotNetCore.Results&version=17.58.0
// Install DotNetCore.Results as a Cake Tool
#tool nuget:?package=DotNetCore.Results&version=17.58.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
DotNetCore.Results
Result
public record Result(ResultType Type, string Message)
{
public bool HasMessage;
public bool IsError;
public bool IsSuccess;
public static Result Error() { }
public static Result Error(string message) { }
public static Result Success() { }
public Result<T> Convert<T>() { }
}
Result<T>
public sealed record Result<T>(ResultType Type, string Message, T Value) : Result(Type, Message)
{
public bool HasValue;
public static new Result<T> Error(string message) { };
public static Result<T> Success(T value) { };
public static new Result<T> Success() { };
}
ResultType
public enum ResultType
{
None = 0,
Success = 1,
Error = 2
}
IResultService
public interface IResultService
{
Result Error();
Result Error(string message);
Result<T> Error<T>(string message);
Result Success();
Result<T> Success<T>(T value);
}
ResultService
public sealed class ResultService : IResultService
{
public ResultService(IStringLocalizer stringLocalizer) { }
public Result Error() { }
public Result Error(string message) { }
public Result<T> Error<T>(string message) { }
public Result Success() { }
public Result<T> Success<T>(T value) { }
}
Extensions
public static class Extensions
{
public static void AddResultService(this IServiceCollection services) { }
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. 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. |
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.
-
net7.0
- Microsoft.Extensions.DependencyInjection (>= 7.0.0)
- Microsoft.Extensions.Localization.Abstractions (>= 7.0.11)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on DotNetCore.Results:
Package | Downloads |
---|---|
DotNetCore.Security
DotNetCore.Security |
|
DotNetCore.AspNetCore
DotNetCore.AspNetCore |
|
DotNetCore.Validation
DotNetCore.Validation |
|
DotNetCore.Mediator
DotNetCore.Mediator |
|
DotNetCore.Services
DotNetCore.Services |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
17.58.0 | 135 | 9/22/2023 |