示例#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))
                     ));
 }