Table of Contents

Class ReturnValue<T>

Namespace
Utils.OData
Assembly
Utils.OData.dll

Represents the result of an OData operation, capturing either a value or an ErrorReturnValue.

public class ReturnValue<T> : ReturnValue<T, ErrorReturnValue>

Type Parameters

T

Type 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

code int

The error code returned by the operation.

message string

Human-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

error ErrorReturnValue

Error descriptor returned by the operation.

ReturnValue(T)

Initializes a new successful instance of the ReturnValue<T> class.

public ReturnValue(T value)

Parameters

value T

The 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

value T

The value to wrap.

Returns

ReturnValue<T>