BudgetAnalyser.Engine.Statement.CsvOnDiskStatementModelRepositoryV1.IsStatementModelAsync C# (CSharp) Method

IsStatementModelAsync() private method

private IsStatementModelAsync ( string storageKey, bool isEncrypted ) : Task
storageKey string
isEncrypted bool
return Task
        internal async Task<bool> IsStatementModelAsync(string storageKey, bool isEncrypted)
        {
            if (storageKey.IsNothing())
            {
                throw new ArgumentNullException(nameof(storageKey));
            }

            this.importUtilities.AbortIfFileDoesntExist(storageKey);
            List<string> allLines = (await ReadLinesAsync(storageKey, 2, isEncrypted)).ToList();
            if (!VersionCheck(allLines))
            {
                return false;
            }

            return true;
        }