/// <summary> /// Starting the archive reports search process /// </summary> /// <param name="accountId">Account to search reports</param> /// <returns>List of achive reports</returns> internal static async Task <List <ArchiveReport> > SearchAsync(string accountId) { Processing = true; try { if (Matching.IsAccountId(accountId)) { if (ArchiveReportsInfo == null) { GoogleSheets googleSheets = new GoogleSheets(); ArchiveReportsInfo = await googleSheets.GetArchiveReportsInfoAsync(); } List <ArchiveReport> reports = new List <ArchiveReport>(); foreach (var item in ArchiveReportsInfo) { if (item[1].ToString() == accountId) { reports.Add(new ArchiveReport(item)); } } return(reports); } return(null); } finally { Processing = false; } }