Пример #1
0
 public static CallInvoker Client(string baseUrl, GrpcClientConfig config = null) =>
 GrpcChannel.ForAddress(baseUrl).ForServiceStack(config);
Пример #2
0
 public ServiceStackClientInterceptor(GrpcChannel channel, GrpcClientConfig config)
 {
     Config         = config ?? throw new ArgumentNullException(nameof(config));
     Config.Channel = channel;
     client         = new GrpcServiceClient(Config);
 }
Пример #3
0
 public static CallInvoker Client(GrpcChannel channel, GrpcClientConfig config = null) =>
 channel.ForServiceStack(config);
Пример #4
0
 public static CallInvoker ForServiceStack(this GrpcChannel channel, GrpcClientConfig config = null) =>
 channel.Intercept(new ServiceStackClientInterceptor(channel, config ?? new GrpcClientConfig()));
Пример #5
0
 public static CallInvoker Client(string baseUrl, X509Certificate2 cert, GrpcClientConfig config) =>
 Client(baseUrl, cert, null, config);