Class EndpointWithoutRequest
use this base class for defining endpoints that doesn't need a request dto. usually used for routes that doesn't have any parameters.
Inheritance
EndpointWithoutRequest
      
  Inherited Members
Namespace: FastEndpoints
Assembly: FastEndpoints.dll
Syntax
public abstract class EndpointWithoutRequest : Endpoint<EmptyRequest, object?>, IEndpoint, IEventBus, IServiceResolverBase, INoRequestMethods
ExecuteAsync(EmptyRequest, CancellationToken)
override the ExecuteAsync(CancellationToken ct) method instead of using this method!
Declaration
public override sealed Task<object?> ExecuteAsync(EmptyRequest _, CancellationToken ct)Parameters
| Type | Name | Description | 
|---|---|---|
| EmptyRequest | _ | |
| CancellationToken | ct | 
Returns
| Type | Description | 
|---|---|
| Task<object> | 
Overrides
ExecuteAsync(CancellationToken)
the handler method for the endpoint. this method is called for each request received.
Declaration
public virtual Task<object?> ExecuteAsync(CancellationToken ct)Parameters
| Type | Name | Description | 
|---|---|---|
| CancellationToken | ct | a cancellation token | 
Returns
| Type | Description | 
|---|---|
| Task<object> | 
HandleAsync(EmptyRequest, CancellationToken)
override the HandleAsync(CancellationToken ct) method instead of using this method!
Declaration
public override sealed Task HandleAsync(EmptyRequest _, CancellationToken ct)Parameters
| Type | Name | Description | 
|---|---|---|
| EmptyRequest | _ | |
| CancellationToken | ct | 
Returns
| Type | Description | 
|---|---|
| Task | 
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
| Type | Name | Description | 
|---|---|---|
| CancellationToken | ct | a cancellation token | 
Returns
| Type | Description | 
|---|---|
| Task |