C# 클래스 BudgetAnalyser.Engine.Services.ReconciliationService

상속: IReconciliationService, ISupportsModelPersistence
파일 보기 프로젝트 열기: Benrnz/BudgetAnalyser

공개 메소드들

메소드 설명
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.

메소드 상세

BeforeReconciliationValidation() 공개 메소드

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
리턴 void

CancelBalanceAdjustment() 공개 메소드

public CancelBalanceAdjustment ( LedgerEntryLine entryLine, System.Guid transactionId ) : void
entryLine BudgetAnalyser.Engine.Ledger.LedgerEntryLine
transactionId System.Guid
리턴 void

Close() 공개 메소드

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

CreateAsync() 공개 메소드

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

CreateBalanceAdjustment() 공개 메소드

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
리턴 BudgetAnalyser.Engine.Ledger.LedgerTransaction

CreateLedgerTransaction() 공개 메소드

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
리턴 BudgetAnalyser.Engine.Ledger.LedgerTransaction

LoadAsync() 공개 메소드

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

MonthEndReconciliation() 공개 메소드

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
리턴 BudgetAnalyser.Engine.Ledger.LedgerEntryLine

ReconciliationService() 공개 메소드

public ReconciliationService ( [ reconciliationManager ) : System
reconciliationManager [
리턴 System

RemoveTransaction() 공개 메소드

public RemoveTransaction ( LedgerEntry ledgerEntry, System.Guid transactionId ) : void
ledgerEntry BudgetAnalyser.Engine.Ledger.LedgerEntry
transactionId System.Guid
리턴 void

SaveAsync() 공개 메소드

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
리턴 System.Threading.Tasks.Task

SavePreview() 공개 메소드

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
리턴 void

TransferFunds() 공개 메소드

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.
리턴 void

UnlockCurrentMonth() 공개 메소드

public UnlockCurrentMonth ( LedgerBook ledgerBook ) : LedgerEntryLine
ledgerBook BudgetAnalyser.Engine.Ledger.LedgerBook
리턴 BudgetAnalyser.Engine.Ledger.LedgerEntryLine

UpdateRemarks() 공개 메소드

public UpdateRemarks ( LedgerEntryLine entryLine, string remarks ) : void
entryLine BudgetAnalyser.Engine.Ledger.LedgerEntryLine
remarks string
리턴 void

ValidateModel() 공개 메소드

Validates the model owned by the service.
public ValidateModel ( StringBuilder messages ) : bool
messages StringBuilder
리턴 bool