Class ModuleInvocationHandler
Handles RPC module invocatios.
Implements
Inherited Members
Namespace: Solti.Utils.Rpc.Pipeline
Assembly: Solti.Utils.Rpc.Server.dll
Syntax
public class ModuleInvocationHandler : RequestHandlerBase<IModuleInvocationHandlerConfig>, IRequestHandler
Constructors
ModuleInvocationHandler(IRequestHandler, IModuleInvocationHandlerConfig)
Creates a new ModuleInvocationHandler instance.
Declaration
public ModuleInvocationHandler(IRequestHandler next, IModuleInvocationHandlerConfig config)
Parameters
Type | Name | Description |
---|---|---|
IRequestHandler | next | |
IModuleInvocationHandlerConfig | config |
Remarks
This handler requires a next
value to be supplied.
Methods
CreateContext(IHttpSession, in CancellationToken)
Parses the context
to a RPC context.
Declaration
protected virtual IRpcRequestContext CreateContext(IHttpSession context, in CancellationToken cancellation)
Parameters
Type | Name | Description |
---|---|---|
IHttpSession | context | |
CancellationToken | cancellation |
Returns
Type | Description |
---|---|
IRpcRequestContext |
CreateResponse(IInjector, IHttpResponse, Object)
Creates the HTTP response.
Declaration
protected virtual async Task CreateResponse(IInjector scope, IHttpResponse response, object result)
Parameters
Type | Name | Description |
---|---|---|
Solti.Utils.DI.Interfaces.IInjector | scope | |
IHttpResponse | response | |
Object | result |
Returns
Type | Description |
---|---|
Task |
Remarks
This operation cannot be cancelled.
HandleAsync(IInjector, IHttpSession, CancellationToken)
Does some handler specific work.
Declaration
public override async Task HandleAsync(IInjector scope, IHttpSession context, CancellationToken cancellation)
Parameters
Type | Name | Description |
---|---|---|
Solti.Utils.DI.Interfaces.IInjector | scope | |
IHttpSession | context | |
CancellationToken | cancellation |
Returns
Type | Description |
---|---|
Task |
Overrides
Solti.Utils.Rpc.Pipeline.RequestHandlerBase<Solti.Utils.Rpc.Pipeline.IModuleInvocationHandlerConfig>.HandleAsync(Solti.Utils.DI.Interfaces.IInjector, Solti.Utils.Rpc.Interfaces.IHttpSession, System.Threading.CancellationToken)