Beispiel #1
0
 public static async Task <GenericResponse <T> > GetFromAccountStore <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, true);
             response.Response = LoadAccount <T>(account, password);
             if (response.Response != null)
             {
                 response.Success = true;
             }
         }
         catch (Exception ex)
         {
             response.Error = ex;
         }
         return response;
     }));
 }