BudgetAnalyser.Engine.Statement.BankStatementImporterRepository.ImportAsync C# (CSharp) Метод

ImportAsync() публичный Метод

Import the given file. It is recommended to call IBankStatementImporterRepository.CanImportAsync first. If the file cannot be imported by any of this repositories importers a NotSupportedException will be thrown.
public ImportAsync ( string fullFileName, Account account ) : Task
fullFileName string
account BudgetAnalyser.Engine.BankAccount.Account
Результат Task
        public async Task<StatementModel> ImportAsync(string fullFileName, Account account)
        {
            foreach (var importer in this.importers)
            {
                if (await importer.TasteTestAsync(fullFileName))
                {
                    return await importer.LoadAsync(fullFileName, account);
                }
            }

            throw new NotSupportedException("The requested file name cannot be loaded. It is not of any known format.");
        }
    }