Exemplo n.º 1
0
 public Task <string> GetToken(string email, string password)
 {
     return(Task.Run(() =>
                     ResponseReader.TokenString(RequestToServer.GetToken(email, password))
                     ));
 }
Exemplo n.º 2
0
 public Task <string> RegiserNewAccount(string email, string password)
 {
     return(Task.Run(() =>
                     ResponseReader.RegistrationStatus(RequestToServer.RegisterNewAccount(email, password))
                     ));
 }
Exemplo n.º 3
0
 public Task <OrderDetailsDTO> CreateNewOrder(Cart cart, string accessToken)
 {
     return(Task.Run(() =>
                     ResponseReader.GetOrderDetails(RequestToServer.CreateNewOrder(cart, accessToken))
                     ));
 }
Exemplo n.º 4
0
 private Task <IEnumerable <IBookDTO> > CheckAvailability(Cart cart, string accessToken)
 {
     return(Task.Run(() =>
                     ResponseReader.GetBooks(RequestToServer.CheckBooksAvailability(cart, accessToken))
                     ));
 }
Exemplo n.º 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))
                     ));
 }
Exemplo n.º 6
0
 // return the details of one book using id
 public Task <IBookDTO> GetBookDetailsAsync(string id)
 {
     return(Task.Run(() =>
                     ResponseReader.GetBookDetails(RequestToServer.RequestBookDetails(id))
                     ));
 }