3 using System.Diagnostics.CodeAnalysis;
7 public abstract class Result<T, TError>
20 public abstract bool TryUnwrapSuccess([MaybeNullWhen(returnValue:
false)] out T value);
21 public abstract bool TryUnwrapFailure([MaybeNullWhen(returnValue:
false)] out TError value);
25 public static (Func<T, Result<T, TError>>
Success, Func<TError, Result<T, TError>>
Failure) GetFactoryMethods()
42 public override bool TryUnwrapFailure([MaybeNullWhen(returnValue:
false)] out TError value)
49 => $
"Success<{typeof(T).NameWithGenerics()}, {typeof(TError).NameWithGenerics()}>({Value})";
71 public override bool TryUnwrapFailure([MaybeNullWhen(returnValue:
false)] out TError value)
78 => $
"Failure<{typeof(T).NameWithGenerics()}, {typeof(TError).NameWithGenerics()}>({Error})";
override bool TryUnwrapFailure([MaybeNullWhen(returnValue:false)] out TError value)
override bool TryUnwrapSuccess([MaybeNullWhen(returnValue:false)] out T value)
override string ToString()
static Result< T, TError > Failure(TError error)
abstract bool TryUnwrapFailure([MaybeNullWhen(returnValue:false)] out TError value)
static Func< T, Result< T, TError > > Success
abstract bool TryUnwrapSuccess([MaybeNullWhen(returnValue:false)] out T value)
static Result< T, TError > Success(T value)
abstract override? string ToString()
override string ToString()
override bool TryUnwrapSuccess([MaybeNullWhen(returnValue:false)] out T value)
override bool TryUnwrapFailure([MaybeNullWhen(returnValue:false)] out TError value)