C# Class BudgetAnalyser.Engine.Statement.CsvOnDiskStatementModelRepositoryV1

Inheritance: IVersionedStatementModelRepository
Show file Open project: Benrnz/BudgetAnalyser Class Usage Examples

Public Methods

Method Description
CreateNewAndSaveAsync ( string storageKey ) : System.Threading.Tasks.Task
CsvOnDiskStatementModelRepositoryV1 ( [ importUtilities, [ logger, StatementModel>.[ mapper, [ readerWriterSelector ) : System
LoadAsync ( string storageKey, bool isEncrypted ) : Task

Protected Methods

Method Description
ReadLinesAsync ( string fileName, bool isEncrypted ) : Task>

Reads the lines from the file asynchronously.

ReadLinesAsync ( string fileName, int lines, bool isEncrypted ) : Task>

Reads the lines from the file asynchronously.

Private Methods

Method Description
CalculateTransactionCheckSum ( TransactionSetDto setDto ) : long
CreateTransactionSet ( string fileName, List allLines, List transactions ) : TransactionSetDto
IsStatementModelAsync ( string storageKey, bool isEncrypted ) : Task
ReadTransactions ( long totalLines, List allLines ) : List
SaveAsync ( StatementModel model, string storageKey, bool isEncrypted ) : System.Threading.Tasks.Task
ValidateChecksumIntegrity ( TransactionSetDto transactionSet ) : void
VersionCheck ( List allLines ) : bool
WriteHeader ( StreamWriter writer, TransactionSetDto setDto ) : void

Method Details

CreateNewAndSaveAsync() public method

public CreateNewAndSaveAsync ( string storageKey ) : System.Threading.Tasks.Task
storageKey string
return System.Threading.Tasks.Task

CsvOnDiskStatementModelRepositoryV1() public method

public CsvOnDiskStatementModelRepositoryV1 ( [ importUtilities, [ logger, StatementModel>.[ mapper, [ readerWriterSelector ) : System
importUtilities [
logger [
mapper StatementModel>.[
readerWriterSelector [
return System

LoadAsync() public method

public LoadAsync ( string storageKey, bool isEncrypted ) : Task
storageKey string
isEncrypted bool
return Task

ReadLinesAsync() protected method

Reads the lines from the file asynchronously.
protected ReadLinesAsync ( string fileName, bool isEncrypted ) : Task>
fileName string
isEncrypted bool
return Task>

ReadLinesAsync() protected method

Reads the lines from the file asynchronously.
protected ReadLinesAsync ( string fileName, int lines, bool isEncrypted ) : Task>
fileName string
lines int
isEncrypted bool
return Task>