Class ReturnValue<T>
Specialized ReturnValue<T, E> that stores errors as strings.
public class ReturnValue<T> : ReturnValue<T, string>
Type Parameters
TType of the returned value.
- Inheritance
-
ReturnValue<T, string>ReturnValue<T>
- Inherited Members
- Extension Methods
Constructors
ReturnValue(string)
Initializes a failed ReturnValue<T> with the provided error message.
public ReturnValue(string error)
Parameters
errorstringThe error description.
ReturnValue(T)
Initializes a successful ReturnValue<T> with the provided value.
public ReturnValue(T value)
Parameters
valueTThe value produced by the operation.
Operators
implicit operator ReturnValue<T>(T)
Creates a successful ReturnValue<T> from a value.
public static implicit operator ReturnValue<T>(T value)
Parameters
valueTThe value to wrap.
Returns
- ReturnValue<T>