 | JsonRpcBuilderExtensionsIntercept Method |
[This is preliminary documentation and is subject to change.]
Adds a handler to intercept the JSON RPC requests.
Namespace:
JsonRpc.AspNetCore
Assembly:
JsonRpc.AspNetCore (in JsonRpc.AspNetCore.dll) Version: 0.5.4+1bad715934a0ae5922832940ca44bbbdaa509cfe
Syntaxpublic static void Intercept(
this IJsonRpcBuilder builder,
Func<RequestContext, Func<Task>, Task> handler
)
<ExtensionAttribute>
Public Shared Sub Intercept (
builder As IJsonRpcBuilder,
handler As Func(Of RequestContext, Func(Of Task), Task)
)
Dim builder As IJsonRpcBuilder
Dim handler As Func(Of RequestContext, Func(Of Task), Task)
builder.Intercept(handler)
public:
[ExtensionAttribute]
static void Intercept(
IJsonRpcBuilder^ builder,
Func<RequestContext^, Func<Task^>^, Task^>^ handler
)
[<ExtensionAttribute>]
static member Intercept :
builder : IJsonRpcBuilder *
handler : Func<RequestContext, Func<Task>, Task> -> unit
Parameters
- builder
- Type: JsonRpc.AspNetCoreIJsonRpcBuilder
[Missing <param name="builder"/> documentation for "M:JsonRpc.AspNetCore.JsonRpcBuilderExtensions.Intercept(JsonRpc.AspNetCore.IJsonRpcBuilder,System.Func{JsonRpc.Server.RequestContext,System.Func{System.Threading.Tasks.Task},System.Threading.Tasks.Task})"]
- handler
- Type: SystemFuncRequestContext, FuncTask, Task
The handler to be added.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IJsonRpcBuilder. 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).
Remarks
If there are multiple calls to this method, the last handler applied will be
the fist to receive the request.
See Also