Exemple #1
0
        public MainWindow()
        {
            InitializeComponent();
            var httpClient = new HttpClient(new HttpLoggingHandler())
            {
                BaseAddress = new Uri("http://localhost:55555/")
            };

            RestTestApi = RestService.For <RestTestService>(httpClient);
        }
        public Worker(ILogger <Worker> logger, IConfiguration configuration)
        {
            _logger = logger;
            var channel    = GrpcChannel.ForAddress("https://localhost:5001/");
            var grpcClient = new TestDataService.TestDataServiceClient(channel);

            _grpcService = new GrpcTestService(grpcClient);

            var httpClient = new HttpClient()
            {
                BaseAddress = new Uri("https://localhost:6001/")
            };

            _restService = new RestTestService(httpClient);
            _concurrency = configuration.GetValue <int>("Concurrency");
        }
Exemple #3
0
        public BenchmarkHarness()
        {
            var channel    = GrpcChannel.ForAddress("https://localhost:5001/");
            var grpcClient = new TestDataService.TestDataServiceClient(channel);

            _grpcService = new GrpcTestService(grpcClient);

            var httpClient2 = new HttpClient()
            {
                BaseAddress = new Uri("https://localhost:7001/")
            };

            _rest2Service = new RestTestService(httpClient2);

            var httpClient3 = new HttpClient()
            {
                BaseAddress = new Uri("https://localhost:6001/")
            };

            _rest3Service = new RestTestService(httpClient3);
        }