Click or drag to resize

EcsBuilderUseMiddlewareExtensionsUseMiddlewareTMiddleware Method (IEcsBuilder, String, Object)

Adds a middleware of the specified type TMiddleware to the handler of the event with the specified name.

Namespace:  SampSharp.Entities
Assembly:  SampSharp.Entities (in SampSharp.Entities.dll) Version: 0.0.0-localbuild+05637d43e9f34d872e453289d4e240c843e43b09
Syntax
C#
public static IEcsBuilder UseMiddleware<TMiddleware>(
	this IEcsBuilder builder,
	string name,
	params Object[] args
)

Parameters

builder
Type: SampSharp.EntitiesIEcsBuilder
The ECS builder to add the middleware to.
name
Type: SystemString
The name of the event.
args
Type: SystemObject
The arguments for the constructor of the event.

Type Parameters

TMiddleware
The type of the middleware.

Return Value

Type: IEcsBuilder
A reference to this instance after the operation has completed.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEcsBuilder. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also