Exemplo n.º 1
0
 public async Task <GenericResponse <T> > GetAccountStore <T>(string username, string password) where T : class, new()
 {
     return(await Task.Run(() =>
     {
         var response = new GenericResponse <T>()
         {
             Success = false
         };
         try
         {
             var account = GetAccount(username);
             response.Response = LoadAccount <T>(account, password);
             if (response.Response != null)
             {
                 response.Success = true;
             }
         }
         catch (Exception ex)
         {
             response.Error = ex;
         }
         return response;
     }));
 }