Beispiel #1
0
        public async Task Register(CalculationOperation servicename, string version)
        {
            var httpClient = new HttpClient();
            var content    = this.PrepareRegistrationContent(servicename.ToString().ToLower(), version);

            await httpClient.PostAsync("http://localhost:55000/api/service", content);
        }
Beispiel #2
0
        public Task <string> GetStringAsync <T>(List <string> serviceAddress, CalculationOperation operation, T v1, T v2)
        {
            var serviceClientAddress = $"{serviceAddress.Random()}/api/{operation.ToString().ToLower()}?v1={v1:G29}&v2={v2:G29}";
            var client = new HttpClient();

            return(client.GetStringAsync(serviceClientAddress));
        }
Beispiel #3
0
 public OperationAvailable(CalculationOperation operation, bool available)
 {
     Operation = operation.ToString();
     Available = available;
 }
Beispiel #4
0
        public async Task <string> GetServicesString(CalculationOperation operation, string version)
        {
            var httpClient = new HttpClient();

            return(await httpClient.GetStringAsync($"http://localhost:55000/api/service?serviceName={operation.ToString().ToLower()}&version={version}"));
        }