Class ReturnValue<T>
Represents the result of an OData operation, capturing either a value or an ErrorReturnValue.
public class ReturnValue<T> : ReturnValue<T, ErrorReturnValue>
Type Parameters
TType of the value returned when the operation succeeds.
- Inheritance
-
ReturnValue<T>
- Inherited Members
- Extension Methods
Constructors
ReturnValue(int, string)
Initializes a new failed instance of the ReturnValue<T> class using an error code and message.
public ReturnValue(int code, string message)
Parameters
codeintThe error code returned by the operation.
messagestringHuman-readable description of the failure.
ReturnValue(ErrorReturnValue)
Initializes a new failed instance of the ReturnValue<T> class using an existing error object.
public ReturnValue(ErrorReturnValue error)
Parameters
errorErrorReturnValueError descriptor returned by the operation.
ReturnValue(T)
Initializes a new successful instance of the ReturnValue<T> class.
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>