Class ConsumerEndpoint<TEntity>
RPC endpoint that takes TEntity as input when invoked.
public class ConsumerEndpoint<TEntity> : RpcEndpointBase, IConsumerEndpoint<TEntity>, IRpcEndpoint, IEndpoint
Type Parameters
TEntityThe type of entity the endpoint takes as input.
- Inheritance
-
ConsumerEndpoint<TEntity>
- Implements
-
IConsumerEndpoint<TEntity>
- Inherited Members
Constructors
ConsumerEndpoint(IEndpoint, string)
Creates a new action endpoint with a relative URI.
public ConsumerEndpoint(IEndpoint referrer, string relativeUri)
Parameters
referrerIEndpointThe endpoint used to navigate to this one.
relativeUristringThe URI of this endpoint relative to the
referrer's. Add a./prefix here to imply a trailing slashreferrer's URI.
ConsumerEndpoint(IEndpoint, Uri)
Creates a new action endpoint with a relative URI.
public ConsumerEndpoint(IEndpoint referrer, Uri relativeUri)
Parameters
referrerIEndpointThe endpoint used to navigate to this one.
relativeUriUriThe URI of this endpoint relative to the
referrer's.
Methods
InvokeAsync(TEntity, CancellationToken)
Sends the entity to the consumer.
public Task InvokeAsync(TEntity entity, CancellationToken cancellationToken = default)
Parameters
entityTEntityThe entity to post as input.
cancellationTokenCancellationTokenUsed to cancel the request.
Returns
Exceptions
- AuthenticationException
- UnauthorizedAccessException
- KeyNotFoundException
- HttpRequestException
Other non-success status code.