Table of Contents

Class ProducerEndpoint<TResult>

Namespace
TypedRest.Endpoints.Rpc
Assembly
TypedRest.dll

RPC endpoint that returns TResult as output when invoked.

public class ProducerEndpoint<TResult> : RpcEndpointBase, IProducerEndpoint<TResult>, IRpcEndpoint, IEndpoint

Type Parameters

TResult

The type of entity the endpoint returns as output.

Inheritance
ProducerEndpoint<TResult>
Implements
Inherited Members

Constructors

ProducerEndpoint(IEndpoint, string)

Creates a new function endpoint with a relative URI.

public ProducerEndpoint(IEndpoint referrer, string relativeUri)

Parameters

referrer IEndpoint

The endpoint used to navigate to this one.

relativeUri string

The URI of this endpoint relative to the referrer's. Add a ./ prefix here to imply a trailing slash referrer's URI.

ProducerEndpoint(IEndpoint, Uri)

Creates a new function endpoint with a relative URI.

public ProducerEndpoint(IEndpoint referrer, Uri relativeUri)

Parameters

referrer IEndpoint

The endpoint used to navigate to this one.

relativeUri Uri

The URI of this endpoint relative to the referrer's.

Methods

InvokeAsync(CancellationToken)

Gets a result from the producer.

public ITask<TResult> InvokeAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Used to cancel the request.

Returns

ITask<TResult>

The result returned by the server.

Exceptions

AuthenticationException

Unauthorized

UnauthorizedAccessException

Forbidden

KeyNotFoundException

NotFound or Gone

HttpRequestException

Other non-success status code.