Пример #1
0
 public Task <string> GetToken(string email, string password)
 {
     return(Task.Run(() =>
                     ResponseReader.TokenString(RequestToServer.GetToken(email, password))
                     ));
 }
Пример #2
0
 public Task <string> RegiserNewAccount(string email, string password)
 {
     return(Task.Run(() =>
                     ResponseReader.RegistrationStatus(RequestToServer.RegisterNewAccount(email, password))
                     ));
 }
Пример #3
0
 public Task <OrderDetailsDTO> CreateNewOrder(Cart cart, string accessToken)
 {
     return(Task.Run(() =>
                     ResponseReader.GetOrderDetails(RequestToServer.CreateNewOrder(cart, accessToken))
                     ));
 }
Пример #4
0
 private Task <IEnumerable <IBookDTO> > CheckAvailability(Cart cart, string accessToken)
 {
     return(Task.Run(() =>
                     ResponseReader.GetBooks(RequestToServer.CheckBooksAvailability(cart, accessToken))
                     ));
 }
Пример #5
0
 // return the list of books matching the search string async
 public Task <IEnumerable <IBookDTO> > GetBooksAsync(string searchString = "")
 {
     return(Task.Run(() =>
                     ResponseReader.GetBooks(RequestToServer.RequestBooks(searchString))
                     ));
 }
Пример #6
0
 // return the details of one book using id
 public Task <IBookDTO> GetBookDetailsAsync(string id)
 {
     return(Task.Run(() =>
                     ResponseReader.GetBookDetails(RequestToServer.RequestBookDetails(id))
                     ));
 }