Ejemplo n.º 1
0
        public void GlobalSetup()
        {
            _serverSelfHost = ServerSelfHost.Program.BuildServer(UseCompression);
            _serverSelfHost.Start();

            var factory = ClientCallsFactory
                          .ForSelfHost(ChannelType.GrpcCore)
                          .WithCompression(UseCompression);

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

            FilePath = ConsoleClient.Program.FindDemoFile();
            ProgressBar.Disable();
        }
Ejemplo n.º 2
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();
        }
Ejemplo n.º 3
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();
        }