Skip to content

Response Methods

Represents the result of a method invocation.

Dispose

abstract
public abstract void Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

FromException(Exception)

static
View source
public static Response FromException(Exception exception)
Creates a new response representing an exception.

Parameters

exceptionException
The exception.

Returns

A new response.

FromResult(TResult)

static
View source
public static Response FromResult<TResult>(TResult value)
Creates a new response object which has been fulfilled with the provided value.

Parameters

valueTResult
The value.

Returns

A new response.

GetResult

abstract
public abstract T GetResult<T>()
Gets the result as the specified type.

Returns

The result.

GetSimpleResultType

virtual
View source
public virtual Type? GetSimpleResultType()
Gets the result type when the response represents a simple typed result.

Returns

The result type, or null when the response does not represent a simple typed result.

ToString

override
View source
public override string ToString()
Returns a string that represents the current object.

Returns

A string that represents the current object.