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.
Inherited Members
Endpoint<EmptyRequest, Object>.SendHeadersAsync(Action<IHeaderDictionary>, Int32, CancellationToken)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: FastEndpoints
Assembly: FastEndpoints.dll
Syntax
public abstract class EndpointWithoutRequest : Endpoint<EmptyRequest, object>, IEndpoint, IEventBus, IServiceResolverBase
Methods
ExecuteAsync(EmptyRequest, CancellationToken)
override the ExecuteAsync(CancellationToken ct) method instead of using this method!
Declaration
public sealed override Task<object> ExecuteAsync(EmptyRequest _, CancellationToken ct)
Parameters
Type | Name | Description |
---|---|---|
EmptyRequest | _ | |
System.Threading.CancellationToken | ct |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Object> |
Overrides
FastEndpoints.Endpoint<FastEndpoints.EmptyRequest, System.Object>.ExecuteAsync(FastEndpoints.EmptyRequest, System.Threading.CancellationToken)
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 |
---|---|---|
System.Threading.CancellationToken | ct | a cancellation token |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Object> |
HandleAsync(EmptyRequest, CancellationToken)
override the HandleAsync(CancellationToken ct) method instead of using this method!
Declaration
public sealed override Task HandleAsync(EmptyRequest _, CancellationToken ct)
Parameters
Type | Name | Description |
---|---|---|
EmptyRequest | _ | |
System.Threading.CancellationToken | ct |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Overrides
FastEndpoints.Endpoint<FastEndpoints.EmptyRequest, System.Object>.HandleAsync(FastEndpoints.EmptyRequest, System.Threading.CancellationToken)
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 |
---|---|---|
System.Threading.CancellationToken | ct | a cancellation token |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |