Class EndpointWithoutRequest<TResponse>
use this base class for defining endpoints that doesn't need a request dto but return a response dto.
Inheritance
EndpointWithoutRequest<TResponse>
Assembly: FastEndpoints.dll
Syntax
public abstract class EndpointWithoutRequest<TResponse> : Endpoint<EmptyRequest, TResponse>, IEndpoint, IEventBus, IServiceResolverBase
Type Parameters
Name |
Description |
TResponse |
the type of the response dto
|
Methods
ExecuteAsync(EmptyRequest, CancellationToken)
override the ExecuteAsync(CancellationToken ct) method instead of using this method!
Declaration
public override sealed Task<TResponse> ExecuteAsync(EmptyRequest _, CancellationToken ct)
Parameters
Returns
Type |
Description |
Task<TResponse> |
|
Overrides
ExecuteAsync(CancellationToken)
the handler method for the endpoint that returns the response dto. this method is called for each request received.
Declaration
public virtual Task<TResponse> ExecuteAsync(CancellationToken ct)
Parameters
Returns
Type |
Description |
Task<TResponse> |
|
HandleAsync(EmptyRequest, CancellationToken)
override the HandleAsync(CancellationToken ct) method instead of using this method!
Declaration
public override sealed Task HandleAsync(EmptyRequest _, CancellationToken ct)
Parameters
Returns
Overrides
HandleAsync(CancellationToken)
the handler method for the endpoint. this method is called for each request received.
Declaration
public virtual Task HandleAsync(CancellationToken ct)
Parameters
Returns
Implements