Exemple #1
0
    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)));
    }
Exemple #2
0
        public ServerHost(GrpcChannelType channelType = GrpcChannelType.GrpcCore)
        {
            _server = new Server
            {
                Ports =
                {
                    new ServerPort("localhost", Port, ServerCredentials.Insecure)
                }
            };

            Channel = GrpcChannelFactory.CreateChannel(channelType, "localhost", Port);
        }
Exemple #3
0
 public HeadersHandlingTest(GrpcChannelType channelType)
 {
     _channelType = channelType;
 }
Exemple #4
0
 public AspNetCoreAuthenticationTest(GrpcChannelType channelType)
 {
     _channelType = channelType;
 }
Exemple #5
0
 public KestrelHost(int port = DefaultPort)
 {
     _port        = port;
     _channelType = GrpcChannelType.GrpcCore;
 }
Exemple #6
0
 public KestrelHost WithChannelType(GrpcChannelType channelType)
 {
     _channelType = channelType;
     return(this);
 }
Exemple #7
0
 public ExceptionHandlingTest(GrpcChannelType channelType)
     : base(channelType)
 {
 }
Exemple #8
0
 public MultipurposeServiceTest(GrpcChannelType channelType)
 {
     _channelType = channelType;
 }
Exemple #9
0
 protected ExceptionHandlingTestBase(GrpcChannelType channelType)
 {
     ChannelType = channelType;
 }