ResultsVH 10.0.0
dotnet add package ResultsVH --version 10.0.0
NuGet\Install-Package ResultsVH -Version 10.0.0
<PackageReference Include="ResultsVH" Version="10.0.0" />
<PackageVersion Include="ResultsVH" Version="10.0.0" />
<PackageReference Include="ResultsVH" />
paket add ResultsVH --version 10.0.0
#r "nuget: ResultsVH, 10.0.0"
#:package ResultsVH@10.0.0
#addin nuget:?package=ResultsVH&version=10.0.0
#tool nuget:?package=ResultsVH&version=10.0.0
ResultsVH
The library which provides the set of results
It splits structures to options:
- Interfaces
- Implementations
The base of the Results
The base of the Results are:
- An interface IResult<T, TE>
- And Implementation: Result<T, TE>
The Interface IResult<out T, out TE>
The code of the interface is
public interface IResult<out T, out TE>
{
public bool IsSuccess { get; }
public T? Data { get; }
public TE? Message { get; }
}
and contains from:
- Main result: the boolean
IsSuccesswhich returnstrueorfalsedepending on this eitherDataorMessagewill have values. - If implementation is used with constructor, which provides
data(ses implementation constructors description) - theDatatakes value, theMessageis set todefaultandIsSuccessdefined astrue. - If implementation is used with constructor, which provides
message(ses implementation constructors description) - theMessagetakes value, theDatais set todefaultandIsSuccessdefined asfalse.
The Implementation Result<T, TE>
The implementation Result<T, TE> contains 2 constructors (each child class recalls the base(X)):
/// Successful
public Result(T data)
{
this.IsSuccess = true;
this.Data = data;
this.Message = default;
}
/// Failed
public Result(TE message)
{
this.IsSuccess = false;
this.Message = message;
this.Data = default;
}
The full list of interfaces (with according implementations)
The Base
IResult<out T, out TE>
The list of the interfaces which are replacing the TE
IResult<out T>:TEdefined asstringIResultWithException<out T>:TEdefined asExceptionIResultWithErrorsArray<out T>:TEdefined as array ofstringIResultWithExceptionsArray<out T>:TEdefined as array ofException
The list of the interfaces which are replacing the T
IResultBool: IResult<bool>IResultBoolWithException : IResultWithException<bool>IResultBoolWithErrorsArray : IResultWithErrorsArray<bool>IResultBoolWithExceptionsArray : IResultWithExceptionsArray<bool>IResultList<T> : IResult<IList<T>>IResultListWithException<T> : IResultWithException<IList<T>>IResultListWithErrorsArray<T> : IResultWithErrorsArray<IList<T>>IResultListWithExceptionsArray<T> : IResultWithExceptionsArray<IList<T>>
Please be free to implement any other interface base on provided ones which will be useful for you.
| 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. |
-
net10.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on ResultsVH:
| Package | Downloads |
|---|---|
|
IUnitOfWorkVH
Unit of work pattern with base Repos (IRepBase/RepBase - get-only; IRep/Rep - get/add/remove) for EFCore 10.0. |
GitHub repositories
This package is not used by any popular GitHub repositories.