Class EcsBuilderUseMiddlewareExtensions
Provides extended functionality for configuring a IEcsBuilder instance.
public static class EcsBuilderUseMiddlewareExtensions
- Inheritance
-
EcsBuilderUseMiddlewareExtensions
- Inherited Members
Methods
UseMiddleware(IEcsBuilder, string, Func<EventContext, Func<object?>, object?>)
Adds a middleware to the handler of the event with the specified name.
public static IEcsBuilder UseMiddleware(this IEcsBuilder builder, string name, Func<EventContext, Func<object?>, object?> middleware)
Parameters
builderIEcsBuilderThe ECS builder to add the middleware to.
namestringThe name of the event.
middlewareFunc<EventContext, Func<object>, object>The middleware to add to the event.
Returns
- IEcsBuilder
A reference to this instance after the operation has completed.
UseMiddleware(IEcsBuilder, string, Func<EventDelegate, EventDelegate>)
Adds a middleware to the handler of the event with the specified name.
public static IEcsBuilder UseMiddleware(this IEcsBuilder builder, string name, Func<EventDelegate, EventDelegate> middleware)
Parameters
builderIEcsBuilderThe ECS builder to add the middleware to.
namestringThe name of the event.
middlewareFunc<EventDelegate, EventDelegate>The middleware to add to the event.
Returns
- IEcsBuilder
A reference to this instance after the operation has completed.
UseMiddleware(IEcsBuilder, string, Type, params object[])
Adds a middleware of the specified type middleware to the handler of the event with
the specified name.
public static IEcsBuilder UseMiddleware(this IEcsBuilder builder, string name, Type middleware, params object[] args)
Parameters
builderIEcsBuilderThe ECS builder to add the middleware to.
namestringThe name of the event.
middlewareTypeThe type of the middleware.
argsobject[]The arguments for the constructor of the event.
Returns
- IEcsBuilder
A reference to this instance after the operation has completed.
UseMiddleware<TMiddleware>(IEcsBuilder, string, params object[])
Adds a middleware of the specified type TMiddleware to the handler of the event
with the specified name.
public static IEcsBuilder UseMiddleware<TMiddleware>(this IEcsBuilder builder, string name, params object[] args)
Parameters
builderIEcsBuilderThe ECS builder to add the middleware to.
namestringThe name of the event.
argsobject[]The arguments for the constructor of the event.
Returns
- IEcsBuilder
A reference to this instance after the operation has completed.
Type Parameters
TMiddlewareThe type of the middleware.