Example #1
0
        public async Task <Room[]> GetRoomsAsync(int[] numbers)
        {
            var request = new Protos.GetRoomsRequest();

            request.Numbers.AddRange(numbers);
            var response = await _client.GetRoomsAsync(request);

            var returnValue = response.Values.Select(x => (global::HotelCore.Client.Room)x).ToArray();

            return(returnValue);
        }
Example #2
0
        public async Task <Room[]> GetRoomsAsync(int[] numbers)
        {
            var request = new Protos.GetRoomsRequest();

            foreach (var value in numbers)
            {
                request.Numbers.Add(value);
            }
            var response = await _client.GetRoomsAsync(request);

            var returnValues = new Room[response.Values.Count];

            for (int i = 0; i < response.Values.Count; i++)
            {
                returnValues[i] = response.Values[i];
            }
            return(returnValues);
        }