Exemple #1
0
        public async Task GlobalSetup()
        {
            _serverAspNetHost = ServerAspNetHost.Program.BuildHost(UseCompression);
            await _serverAspNetHost.StartAsync();

            var factory = ModeInternal.HasValue ? ClientCallsFactory.ForAspNetHost(ModeInternal.Value) : ClientCallsFactory.ForAspNetHost(ChannelType.GrpcNet);

            factory.WithCompression(UseCompression);

            CallsDefault     = factory.CreateFileService();
            CallsRentedArray = factory.CreateFileServiceRentedArray();

            CallsHttpClient = ClientCallsFactory.CreateHttpClient(UseCompression);

            FilePath = ConsoleClient.Program.FindDemoFile();
            ProgressBar.Disable();
        }
Exemple #2
0
        public async Task GlobalSetup()
        {
            _serverAspNetHost = ServerAspNetHost.Program.BuildHost(UseCompression);
            await _serverAspNetHost.StartAsync();

            CallsCoreChannel = ClientCallsFactory
                               .ForChannel(Hosts.ServerAspNetHostHttp2, ChannelType.GrpcCore)
                               .WithCompression(UseCompression)
                               .CreateFileServiceRentedArray();

            CallsNetChannel = ClientCallsFactory
                              .ForChannel(Hosts.ServerAspNetHostHttp2, ChannelType.GrpcNet)
                              .WithCompression(UseCompression)
                              .CreateFileServiceRentedArray();

            CallsHttpClient = ClientCallsFactory.CreateHttpClient(UseCompression);

            FilePath = ConsoleClient.Program.FindDemoFile();
            ProgressBar.Disable();
        }