示例#1
0
 // Constructor
 public TypedRpcMiddleware(OwinMiddleware next, TypedRpcOptions options)
     : base(next)
 {
     // Initializations
     Options = options ?? new TypedRpcOptions();
 }
示例#2
0
 /// <summary>
 /// Maps RpcServer in OWIN.
 /// </summary>
 public static void MapTypedRpc(this IAppBuilder app, TypedRpcOptions options = null)
 {
     app.Map("/typedrpc/client", appBuilder => appBuilder.Use <TypedRpcClientMiddleware>(new object[0]));
     app.Map("/typedrpc", appBuilder => appBuilder.Use <TypedRpcMiddleware>(new object[] { options }));
 }