Exemplo n.º 1
0
        public async Task <string> CheckForMedication(string name, Pharmacy pharmacy)
        {
            var channel = new Channel(pharmacy.APIEndpoint, ChannelCredentials.Insecure);
            var client  = new CheckForMedication.CheckForMedicationClient(channel);

            MessageResponseProto response = await client.checkAsync(new MessageProto()
            {
                Message = name
            });

            return(response.Response);
        }
Exemplo n.º 2
0
        public async Task <string> Echo(Pharmacy pharmacy)
        {
            var channel = new Channel(pharmacy.APIEndpoint, ChannelCredentials.Insecure);

            var echo = new CheckForMedication.CheckForMedicationClient(channel);

            MessageResponseProto response = await echo.echoAsync(new MessageProto()
            {
                Message = "Hello!"
            });

            return(response.Response);
        }