Table of Contents

Interface IFunctionEndpoint<TEntity, TResult>

Namespace
TypedRest.Endpoints.Rpc
Assembly
TypedRest.dll

RPC endpoint that takes TEntity as input and returns TResult as output when invoked.

public interface IFunctionEndpoint<in TEntity, TResult> : IRpcEndpoint, IEndpoint

Type Parameters

TEntity

The type of entity the endpoint takes as input.

TResult

The type of entity the endpoint returns as output.

Inherited Members

Methods

InvokeAsync(TEntity, CancellationToken)

Invokes the function.

Task<TResult> InvokeAsync(TEntity entity, CancellationToken cancellationToken = default)

Parameters

entity TEntity

The entity to post as input.

cancellationToken CancellationToken

Used to cancel the request.

Returns

Task<TResult>

The result returned by the server.

Exceptions

AuthenticationException

Unauthorized

UnauthorizedAccessException

Forbidden

KeyNotFoundException

NotFound or Gone

HttpRequestException

Other non-success status code.