Exemplo n.º 1
0
        public async Task <InitialResponse> InitializeQueryAsync(InitialRequest request)
        {
            if (request == null)
            {
                throw new NullReferenceException(nameof(request));
            }

            if (!request.HasRoute)
            {
                throw new InvalidOperationException("The request hasn't any route");
            }

            var response = await GetInitializeQueryAsync(request).ConfigureAwait(false);

            if (response.Succeeded)
            {
                await Task.Delay(1500).ConfigureAwait(false);
            }

            return(response);
        }
Exemplo n.º 2
0
        private Task <InitialResponse> GetInitializeQueryAsync(InitialRequest request)
        {
            var requestUrl = request.ToString();

            return(GetAsync <InitialResponse>(requestUrl));
        }