C# 클래스 EdjCase.JsonRpc.Router.RpcRouter

Router for Asp.Net to direct Http Rpc requests to the correct method, invoke it and return the proper response
상속: IRouter
파일 보기 프로젝트 열기: edjCase/JsonRpc

Private Properties

프로퍼티 타입 설명
SetErrorResponse System.Threading.Tasks.Task
SetResponse System.Threading.Tasks.Task

공개 메소드들

메소드 설명
GetVirtualPath ( VirtualPathContext context ) : VirtualPathData

Generates the virtual path data for the router

RouteAsync ( Microsoft.AspNetCore.Routing.RouteContext context ) : System.Threading.Tasks.Task

Takes a route/http contexts and attempts to parse, invoke, respond to an Rpc request

RpcRouter ( IOptions serverConfig, IRpcInvoker invoker, IRpcParser parser, IRpcCompressor compressor, ILogger logger, IRpcRouteProvider routeProvider ) : System

비공개 메소드들

메소드 설명
SetErrorResponse ( Microsoft.AspNetCore.Routing.RouteContext context, RpcException exception ) : System.Threading.Tasks.Task

Sets the http response to the corresponding Rpc exception

SetResponse ( Microsoft.AspNetCore.Routing.RouteContext context, List responses, bool isBulkRequest, JsonSerializerSettings jsonSerializerSettings = null ) : System.Threading.Tasks.Task

Sets the http response with the given Rpc responses

메소드 상세

GetVirtualPath() 공개 메소드

Generates the virtual path data for the router
public GetVirtualPath ( VirtualPathContext context ) : VirtualPathData
context VirtualPathContext Virtual path context
리턴 VirtualPathData

RouteAsync() 공개 메소드

Takes a route/http contexts and attempts to parse, invoke, respond to an Rpc request
public RouteAsync ( Microsoft.AspNetCore.Routing.RouteContext context ) : System.Threading.Tasks.Task
context Microsoft.AspNetCore.Routing.RouteContext Route context
리턴 System.Threading.Tasks.Task

RpcRouter() 공개 메소드

public RpcRouter ( IOptions serverConfig, IRpcInvoker invoker, IRpcParser parser, IRpcCompressor compressor, ILogger logger, IRpcRouteProvider routeProvider ) : System
serverConfig IOptions Configuration data for the server
invoker IRpcInvoker Component that invokes Rpc requests target methods and returns a response
parser IRpcParser Component that parses Http requests into Rpc requests
compressor IRpcCompressor Component that compresses Rpc responses
logger ILogger Component that logs actions from the router
routeProvider IRpcRouteProvider Provider that allows the retrieval of all configured routes
리턴 System