public static ChannelBase CreateChannel(GrpcChannelType channelType, string host, int port) { if (channelType == GrpcChannelType.GrpcCore) { return(new GrpcCoreChannel(host, port, ChannelCredentials.Insecure)); } return(GrpcChannel.ForAddress("http://{0}:{1}".FormatWith(host, port))); }
public ServerHost(GrpcChannelType channelType = GrpcChannelType.GrpcCore) { _server = new Server { Ports = { new ServerPort("localhost", Port, ServerCredentials.Insecure) } }; Channel = GrpcChannelFactory.CreateChannel(channelType, "localhost", Port); }
public HeadersHandlingTest(GrpcChannelType channelType) { _channelType = channelType; }
public AspNetCoreAuthenticationTest(GrpcChannelType channelType) { _channelType = channelType; }
public KestrelHost(int port = DefaultPort) { _port = port; _channelType = GrpcChannelType.GrpcCore; }
public KestrelHost WithChannelType(GrpcChannelType channelType) { _channelType = channelType; return(this); }
public ExceptionHandlingTest(GrpcChannelType channelType) : base(channelType) { }
public MultipurposeServiceTest(GrpcChannelType channelType) { _channelType = channelType; }
protected ExceptionHandlingTestBase(GrpcChannelType channelType) { ChannelType = channelType; }