public static IServiceCollection AddDotNetCoreRpcServer(this IServiceCollection services, Action <RpcServerOptions> options)
        {
            RpcServerOptions rpcServerOptions = new RpcServerOptions(services);

            options.Invoke(rpcServerOptions);
            services.AddSingleton(rpcServerOptions);
            return(services);
        }
 public DotNetCoreRpcMiddleware(RequestDelegate next, RpcServerOptions rpcServerOptions)
 {
     _types       = rpcServerOptions.GetTypes();
     _filterTypes = rpcServerOptions.GetFilterTypes();
 }