C# Class BudgetAnalyser.Engine.Services.ReconciliationService

Inheritance: IReconciliationService, ISupportsModelPersistence
Afficher le fichier Open project: Benrnz/BudgetAnalyser

Méthodes publiques

Méthode Description
BeforeReconciliationValidation ( LedgerBook book, StatementModel model ) : void

An optional validation method the UI can call before invoking MonthEndReconciliation to test for validation warnings. If validation fails a new ValidationWarningException is thrown; otherwise the method returns.

CancelBalanceAdjustment ( LedgerEntryLine entryLine, System.Guid transactionId ) : void
Close ( ) : void

Closes the currently loaded file. No warnings will be raised if there is unsaved data.

CreateAsync ( ApplicationDatabase applicationDatabase ) : System.Threading.Tasks.Task

Create a new file specific for that service's data.

CreateBalanceAdjustment ( LedgerEntryLine entryLine, decimal amount, string narrative, Account account ) : LedgerTransaction
CreateLedgerTransaction ( LedgerEntryLine reconciliation, LedgerEntry ledgerEntry, decimal amount, string narrative ) : LedgerTransaction
LoadAsync ( ApplicationDatabase applicationDatabase ) : System.Threading.Tasks.Task

Loads a data source with the provided database reference data asynchronously.

MonthEndReconciliation ( LedgerBook ledgerBook, System.DateTime reconciliationDate, IBudgetCurrencyContext budgetContext, StatementModel statement, bool ignoreWarnings ) : LedgerEntryLine
ReconciliationService ( [ reconciliationManager ) : System
RemoveTransaction ( LedgerEntry ledgerEntry, System.Guid transactionId ) : void
SaveAsync ( ApplicationDatabase applicationDatabase ) : System.Threading.Tasks.Task

Saves the application database asynchronously. This may be called using a background worker thread.

SavePreview ( ) : void

Called before Save is called. This will be called on the UI Thread. Objects can optionally add some context data that will be passed to the ISupportsModelPersistence.SaveAsync method call. This can be used to finalise any edits or prompt the user for closing data, ie, a "what-did-you-change" comment; this can't be done during save as it may not be called using the UI Thread.

TransferFunds ( LedgerEntryLine reconciliation, TransferFundsCommand transferDetails ) : void

Transfer funds from one ledger bucket to another. This is only possible if the current ledger reconciliation is unlocked. This is usually used during reconciliation.

UnlockCurrentMonth ( LedgerBook ledgerBook ) : LedgerEntryLine
UpdateRemarks ( LedgerEntryLine entryLine, string remarks ) : void
ValidateModel ( StringBuilder messages ) : bool

Validates the model owned by the service.

Method Details

BeforeReconciliationValidation() public méthode

An optional validation method the UI can call before invoking MonthEndReconciliation to test for validation warnings. If validation fails a new ValidationWarningException is thrown; otherwise the method returns.
public BeforeReconciliationValidation ( LedgerBook book, StatementModel model ) : void
book BudgetAnalyser.Engine.Ledger.LedgerBook
model BudgetAnalyser.Engine.Statement.StatementModel
Résultat void

CancelBalanceAdjustment() public méthode

public CancelBalanceAdjustment ( LedgerEntryLine entryLine, System.Guid transactionId ) : void
entryLine BudgetAnalyser.Engine.Ledger.LedgerEntryLine
transactionId System.Guid
Résultat void

Close() public méthode

Closes the currently loaded file. No warnings will be raised if there is unsaved data.
public Close ( ) : void
Résultat void

CreateAsync() public méthode

Create a new file specific for that service's data.
public CreateAsync ( ApplicationDatabase applicationDatabase ) : System.Threading.Tasks.Task
applicationDatabase BudgetAnalyser.Engine.Persistence.ApplicationDatabase
Résultat System.Threading.Tasks.Task

CreateBalanceAdjustment() public méthode

public CreateBalanceAdjustment ( LedgerEntryLine entryLine, decimal amount, string narrative, Account account ) : LedgerTransaction
entryLine BudgetAnalyser.Engine.Ledger.LedgerEntryLine
amount decimal
narrative string
account BudgetAnalyser.Engine.BankAccount.Account
Résultat BudgetAnalyser.Engine.Ledger.LedgerTransaction

CreateLedgerTransaction() public méthode

public CreateLedgerTransaction ( LedgerEntryLine reconciliation, LedgerEntry ledgerEntry, decimal amount, string narrative ) : LedgerTransaction
reconciliation BudgetAnalyser.Engine.Ledger.LedgerEntryLine
ledgerEntry BudgetAnalyser.Engine.Ledger.LedgerEntry
amount decimal
narrative string
Résultat BudgetAnalyser.Engine.Ledger.LedgerTransaction

LoadAsync() public méthode

Loads a data source with the provided database reference data asynchronously.
public LoadAsync ( ApplicationDatabase applicationDatabase ) : System.Threading.Tasks.Task
applicationDatabase BudgetAnalyser.Engine.Persistence.ApplicationDatabase
Résultat System.Threading.Tasks.Task

MonthEndReconciliation() public méthode

public MonthEndReconciliation ( LedgerBook ledgerBook, System.DateTime reconciliationDate, IBudgetCurrencyContext budgetContext, StatementModel statement, bool ignoreWarnings ) : LedgerEntryLine
ledgerBook BudgetAnalyser.Engine.Ledger.LedgerBook
reconciliationDate System.DateTime
budgetContext IBudgetCurrencyContext
statement BudgetAnalyser.Engine.Statement.StatementModel
ignoreWarnings bool
Résultat BudgetAnalyser.Engine.Ledger.LedgerEntryLine

ReconciliationService() public méthode

public ReconciliationService ( [ reconciliationManager ) : System
reconciliationManager [
Résultat System

RemoveTransaction() public méthode

public RemoveTransaction ( LedgerEntry ledgerEntry, System.Guid transactionId ) : void
ledgerEntry BudgetAnalyser.Engine.Ledger.LedgerEntry
transactionId System.Guid
Résultat void

SaveAsync() public méthode

Saves the application database asynchronously. This may be called using a background worker thread.
public SaveAsync ( ApplicationDatabase applicationDatabase ) : System.Threading.Tasks.Task
applicationDatabase BudgetAnalyser.Engine.Persistence.ApplicationDatabase
Résultat System.Threading.Tasks.Task

SavePreview() public méthode

Called before Save is called. This will be called on the UI Thread. Objects can optionally add some context data that will be passed to the ISupportsModelPersistence.SaveAsync method call. This can be used to finalise any edits or prompt the user for closing data, ie, a "what-did-you-change" comment; this can't be done during save as it may not be called using the UI Thread.
public SavePreview ( ) : void
Résultat void

TransferFunds() public méthode

Transfer funds from one ledger bucket to another. This is only possible if the current ledger reconciliation is unlocked. This is usually used during reconciliation.
public TransferFunds ( LedgerEntryLine reconciliation, TransferFundsCommand transferDetails ) : void
reconciliation BudgetAnalyser.Engine.Ledger.LedgerEntryLine /// The reconciliation line that this transfer will be created in. A transfer can only occur /// between two ledgers in the same reconciliation. ///
transferDetails BudgetAnalyser.Engine.Ledger.TransferFundsCommand The details of the requested transfer.
Résultat void

UnlockCurrentMonth() public méthode

public UnlockCurrentMonth ( LedgerBook ledgerBook ) : LedgerEntryLine
ledgerBook BudgetAnalyser.Engine.Ledger.LedgerBook
Résultat BudgetAnalyser.Engine.Ledger.LedgerEntryLine

UpdateRemarks() public méthode

public UpdateRemarks ( LedgerEntryLine entryLine, string remarks ) : void
entryLine BudgetAnalyser.Engine.Ledger.LedgerEntryLine
remarks string
Résultat void

ValidateModel() public méthode

Validates the model owned by the service.
public ValidateModel ( StringBuilder messages ) : bool
messages StringBuilder
Résultat bool