private async Task <Object> GetAllBooks()
        {
            String token = getAllBooksToken;

            if (token == null)
            {
                var payment = await getToken(
                    new DateRange(DateTime.Today, DateTime.Today.AddDays(2.0)), "GetAllBooks");

                if (payment is ErrorViewModel)
                {
                    return(payment);
                }
                token = payment as String;
            }


            LibraryServiceSoapClient.EndpointConfiguration endpointConfiguration = LibraryServiceSoapClient.EndpointConfiguration.LibraryServiceSoap;
            var client  = new LibraryServiceSoapClient(endpointConfiguration);
            var request = new GetAllBooksRequest();

            request.Body = new GetAllBooksRequestBody(defaultToken);

            var result = await client.GetAllBooksAsync(token);

            return(result);
        }
Пример #2
0
        private async Task <GetAllBooksResponse> GetAllBooks()
        {
            LibraryServiceSoapClient.EndpointConfiguration endpointConfiguration = LibraryServiceSoapClient.EndpointConfiguration.LibraryServiceSoap;
            var client  = new LibraryServiceSoapClient(endpointConfiguration);
            var request = new GetAllBooksRequest();

            request.Body = new GetAllBooksRequestBody(token);

            var result = await client.GetAllBooksAsync(request);

            return(result);
        }