Namespace FastEndpoints
Classes
BaseEndpoint
the base class all fast endpoints inherit from
BindFromAttribute
use this attribute to specify the name of route param, query param, or form field if it's different from the name of the property being bound to.
BindingOptions
request binding options
CommandExtensions
CommandHandlerBase<TCommand>
the base class from which all CommandHandler<TCommand> classes inherit from
CommandHandler<TCommand>
inherit this base class if you'd like to manipulate validation state of the calling endpoint from within the command handler.
CommandHandler<TCommand, TResult>
inherit this base class if you'd like to manipulate validation state of the calling endpoint from within the command handler.
Config
global configuration settings for FastEndpoints
DontInjectAttribute
endpoint properties marked with this attribute will disable property injection for that property
DontRegisterAttribute
classes marked with this attribute will be skipped during assembly scanning for auto registration
EmptyObject
EndpointDefinition
represents the configuration settings of an endpoint
EndpointDiscoveryOptions
defines how endpoint discovery and registration should be done at startup
EndpointFactory
the default endpoint factory. it creates an instance of the endpoint and injects both constructor and property dependencies.
EndpointOptions
endpoint registration options
EndpointSummary
a class used for providing a textual description about an endpoint for swagger
EndpointSummary<TRequest>
a class used for providing a textual description about an endpoint for swagger
EndpointWithMapper<TRequest, TMapper>
use this base class for defining endpoints that only use a request dto and don't use a response dto but uses a request mapper.
EndpointWithMapping<TRequest, TResponse, TEntity>
use this base class for defining endpoints that use both request and response dtos as well as require mapping to and from a domain entity.
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.
EndpointWithoutRequest<TResponse>
use this base class for defining endpoints that doesn't need a request dto but return a response dto.
EndpointWithoutRequest<TResponse, TMapper>
use this base class for defining endpoints that doesn't need a request dto but return a response dto and uses a response mapper.
Endpoint<TRequest>
use this base class for defining endpoints that only use a request dto and don't use a response dto.
Endpoint<TRequest, TResponse>
use this base class for defining endpoints that use both request and response dtos.
Endpoint<TRequest, TResponse, TMapper>
use this base class for defining endpoints that use both request and response dtos as well as require mapping to and from a domain entity using a seperate entity mapper.
EpVersion
represents an endpoint version
ErrorOptions
error response customization settings
ErrorResponse
the dto used to send an error response to the client
EventBase
base class for the event bus
EventBus<TEvent>
event notification bus which uses an in-process pub/sub messaging system
EventExtensions
EventHubExceptionReceiver
inherit this class and override it's methods in order to receive event hub exceptions.
EventHubExceptionReceiverExtensions
ExceptionHandlerExtensions
extensions for global exception handling
Factory
a factory for instantiating endpoints/event/mappers/validators/etc. for testing purposes
FromAttribute
properties decorated with this attribute will have their values auto bound from the relevant claim of the current user principal. this is a shorter alias for the [FromClaim] attribute.
FromBodyAttribute
properties decorated with this attribute will have their values auto bound from the incoming request's json body.
HINT: no other binding sources will be used for binding that property.
FromClaimAttribute
properties decorated with this attribute will have their values auto bound from the relevant claim of the current user principal
FromHeaderAttribute
properties decorated with this attribute will have their values auto bound from the relevant http header of the current request.
FromQueryParamsAttribute
properties decorated with this attribute will be bound by obtaining the values from query string parameters with matching names.
WARNING: valid only on complex types with at least one public property. only one dto property can be decorated with this attribute.
GlobalPostProcessor<TState>
inherit this class to create a global post-processor with access to the common processor state of the endpoint
GlobalPreProcessor<TState>
inherit this class to create a global pre-processor with access to the common processor state of the endpoint
Group
common configuration for a group of endpoints can be specified by implementing this abstract class and calling Configure(string, Action<EndpointDefinition>) in the constructor.
HandlerOptions<TStorageRecord, TStorageProvider>
handler registration options
HandlerServerExtensions
handler server extensions
HasPermissionAttribute
boolean properties decorated with this attribute will have their values set to true if the current principal has the specified permission.
HideFromDocsAttribute
attribute used to mark classes that should be hidden from public api
HttpAttribute
base http attribute class
HttpClientExtensions
a set of extensions to the httpclient in order to facilitate route-less integration testing
HttpContextExtensions
HttpDeleteAttribute
use this attribute to specify a DELETE route for an endpoint
HttpGetAttribute
use this attribute to specify a GET route for an endpoint
HttpPatchAttribute
use this attribute to specify a PATCH route for an endpoint
HttpPostAttribute
use this attribute to specify a POST route for an endpoint
HttpPutAttribute
use this attribute to specify a PUT route for an endpoint
HttpResponseExtensions
InMemoryEventHubStorage
InMemoryEventQueue
provides some global configuration options for the in-memory event queues
InMemoryEventStorageRecord
InternalErrorResponse
the dto used to send an error response to the client when an unhandled exception occurs on the server
JobQueueExtensions
extension methods for job queues
JobQueueOptions
options for job queues
MainExtensions
provides extensions to easily bootstrap fastendpoints in the asp.net middleware pipeline
Mapper<TRequest, TResponse, TEntity>
use this base class to define domain entity mappers for your endpoints.
HINT: entity mappers are used as singletons for performance reasons. do not maintain state in the mappers.
MiddlewareExtensions
PlainTextRequest
use this dto if you need to model bind the raw content body of an incoming http request or you may implement the IPlainTextRequest interface on your own request dto.
PostProcessorContext<TRequest, TResponse>
represents the context for a post-processing operation with a request and response pair.
PostProcessor<TRequest, TState, TResponse>
inherit this class to create a post-processor with access to the common processor state of the endpoint.
PreProcessorContext<TRequest>
represents the context for a pre-processing operation with a request.
PreProcessor<TRequest, TState>
inherit this class to create a pre-processor with access to the common processor state of the endpoint
ProblemDetails
RFC7807 compatible problem details/ error response class. this can be used by configuring startup like so:
app.UseFastEndpoints(x => x.Errors.ResponseBuilder = ProblemDetails.ResponseBuilder);
ProblemDetails.Error
the error details object
QueryParamAttribute
properties decorated with this attribute will have a corresponding request parameter added to the swagger schema
RegisterServiceAttribute<TService>
When using the 'FastEndpoints.Generator' package, any concrete class can be decorated with this attribute to source generate extension methods
in the form of .RegisterServicesFrom{assembly-name}()
which can be used to automatically register services with a single call per assembly.
instead of multiple calls per each service you need registered in DI.
specify the service type with the TService
generic attribute argument. the service type would typically be an interface type.
RemoteConnection
represents a connection to a remote server that hosts command and event handlers
RemoteConnectionExtensions
client extension methods
RequestBinder<TRequest>
the default request binder for a given request dto type
RequestMapper<TRequest, TEntity>
use this base class to define a domain entity mapper for your endpoints that only has a request dto and no response dto.
HINT: entity mappers are used as singletons for performance reasons. do not maintain state in the mappers.
ResponseHeader
describes a swagger response header for a certain response dto
ResponseMapper<TResponse, TEntity>
use this base class to define a domain entity mapper for your endpoints that only has a response dto and no request dto.
HINT: entity mappers are used as singletons for performance reasons. do not maintain state in the mappers.
RouteHandlerBuilderExtensions
SecurityOptions
global security options
SerializerOptions
serialization options for the endpoints
ServiceScopeExtensions
SubGroup<TParent>
common configuration for a sub group of endpoints can be specified by implementing this abstract class and calling Configure(string, Action<EndpointDefinition>) in the constructor.
SubscriberExceptionReceiver
inherit this class and override it's methods in order to receive event subscriber exceptions.
SubscriberExceptionReceiverExtensions
Summary<TEndpoint>
a class used for providing a textual description about an endpoint for swagger
Summary<TEndpoint, TRequest>
a class used for providing a textual description about an endpoint for swagger
TestResult<TResponse>
a record encapsulating the http response as well as the resulting dto of a test execution
TestingExtensions
extension methods for registering fake/test/mock command and event handlers for integration testing
ThrottleAttribute
rate limit requests to this endpoint based on a request http header sent by the client.
ThrottleOptions
global settings for throttling
UserPrivileges
the priviledges of the user which will be embedded in the jwt or cookie
ValidationContext
provides a way to manipulate the validation failures of the current endpoint context. call Instance to obtain an instance of the current validation context.
ValidationContext<T>
ValidationFailureException
the exception thrown when validation failure occurs.
inspect the Failures
property for details.
ValidationOptions
validation related options
Validator<TRequest>
inherit from this base class to define your dto validators
HINT: validators are registered as singletons. i.e. the same validator instance is used to validate each request for best performance. hance, do not maintain state in your validators.
VersioningOptions
global endpoint versioning options
Structs
BinderContext
binder context supplied to custom request binders.
EmptyRequest
a request dto that doesn't have any properties
EmptyResponse
a response dto that doesn't have any properties
ParseResult
dto used to hold the result of a value parsing operation
PendingJobSearchParams<TStorageRecord>
a dto representing search parameters for pending job storage record retrieval
PendingRecordSearchParams<TStorageRecord>
a dto representing search parameters for pending event storage record retrieval
StaleJobSearchParams<TStorageRecord>
a dto representing search parameters for matching stale job storage records
StaleRecordSearchParams<TStorageRecord>
a dto representing search parameters for matching stale event storage records
SubscriberIDRestorationParams<TStorageRecord>
parameters to use in finding subscriber IDs to restore
Interfaces
IClientStreamCommandHandler<T, TResult>
interface to be implemented by a command handler for a stream of T
that returns a single TResult
.
ICommand
interface for a command that does not return anything
ICommandHandler
marker interface for all command handlers
ICommandHandler<TCommand>
interface to be implemented by a command handler for a given command type that does not return a result
ICommandHandler<TCommand, TResult>
interface to be implemented by a command handler for a given command type that returns a result
ICommand<TResult>
interface for a command that returns a TResult
IEndpoint
the common interface implemented by all endpoints
IEndpointFactory
interface for the creation of endpoints.
IEvent
marker interface for an event model
IEventBus
interface to be implemented by an event bus
IEventHandler
marker interface for all event handlers
IEventHandler<TEvent>
interface to be implemented by event handlers
IEventHubStorageProvider<TStorageRecord>
interface for implementing a storage provider for event hub app (gRPC server)
IEventStorageRecord
interface for implementing an event storage record that encapsulates/embeds an event (IEvent)
IEventSubscriberStorageProvider<TStorageRecord>
interface for implementing a storage provider for an event subscription client app (gRPC client)
IGlobalPostProcessor
interface for defining global post-processors to be executed after the main endpoint handler is done
IGlobalPreProcessor
interface for defining global pre-processors to be executed before the main endpoint handler is called
IHasMapper
marker interface for endpoints that has a mapper
IHasMapper<TMapper>
marker/constraint for endpoints that have a mapper generic argument
IJobStorageProvider<TStorageRecord>
interface for defining the contract of a job storage provider
IJobStorageRecord
IMapper
marker interface for entity mappers
IPlainTextRequest
implement this interface on your request dto if you need to model bind the raw content body of an incoming http request
IPostProcessor
defines the interface for a post-processor that can perform asynchronous post-processing tasks after a request has been handled.
IPostProcessorContext
defines the basic interface for a post-processor context, containing essential properties to access request, response, and associated processing details.
IPostProcessorContext<TRequest, TResponse>
defines the generic interface for a post-processor context with specific types for the request and response.
IPostProcessor<TRequest, TResponse>
defines the generic interface for a post-processor with specific types for the request and response, enabling type-safe post-processing.
IPreProcessor
defines the interface for a pre-processor that can perform asynchronous pre-processing tasks before a request has been handled.
IPreProcessorContext
defines the basic interface for a pre-processor context, containing essential properties to access request, and associated processing details.
IPreProcessorContext<TRequest>
defines the generic interface for a pre-processor context with a specific type for the request.
IPreProcessor<TRequest>
defines the generic interface for a pre-processor with specific types for the request, enabling type-safe pre-processing.
IRequestBinder<TRequest>
create custom request binders by implementing this interface. by registering a custom modelbinder for an endpoint will completely disable the built-in model binding and completely depend on your implementation of the custom binder to return a correctly populated request dto for the endpoint.
IRequestMapper
marker interface for request only mappers
IResponseInterceptor
interface for defining a response interceptor to be executed before the main endpoint handler executes
IResponseMapper
marker interface for response only mappers
IServerStreamCommandHandler<TCommand, TResult>
interface to be implemented by a command handler for a given command type that returns TResult
stream
IServerStreamCommand<TResult>
interface for a command that returns a stream of TResult
IServiceResolver
interface used by fastendpoints for resolving services from the DI container. implement this interface and register the implementation in MS DI for customizing service resolving.
IServiceResolverBase
interface used by fastendpoints for resolving services from the DI container. implement this interface and register the implementation in MS DI for customizing service resolving.
Enums
Apply
BindingSource
enum for choosing which binding sources the default request binder should use
Http
enum for specifying a http verb
HubMode
enum for specifying which mode the event hub should be running in.
LifeTime
enum for selecting the DI service lifetime
Mode
enum for specifying the waiting mode for event notifications
Order
enum used to specify whether to execute global pre/post processors before endpoint level processors