C# Class BudgetAnalyser.Engine.Statement.StatementModel

Inheritance: INotifyPropertyChanged
Mostra file Open project: Benrnz/BudgetAnalyser Class Usage Examples

Public Methods

Method Description
CalculateDuration ( GlobalFilterCriteria criteria, IEnumerable transactions ) : int

Calculates the duration in months from the beginning of the period to the end.

Dispose ( ) : void

Implement IDisposable. Do not make this method virtual. A derived class should not be able to override this method

SignificantDataChangeHash ( ) : long

Calcuates a hash that represents a data state for the current instance. When the data state changes the hash will change.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Allows derivatives to customise dispose logic.

Private Methods

Method Description
BaseFilterQuery ( GlobalFilterCriteria criteria ) : IEnumerable
Filter ( GlobalFilterCriteria criteria ) : void
LoadTransactions ( IEnumerable transactions ) : StatementModel

Used internally by the importers to load transactions into the statement model.

Merge ( [ additionalModel ) : StatementModel
OnPropertyChanged ( [ propertyName = null ) : void
OnTransactionPropertyChanged ( object sender, PropertyChangedEventArgs propertyChangedEventArgs ) : void
ReassignFixedProjectTransactions ( [ bucket, [ reassignmentBucket ) : void
RemoveTransaction ( [ transaction ) : void
SplitTransaction ( [ originalTransaction, decimal splinterAmount1, decimal splinterAmount2, [ splinterBucket1, [ splinterBucket2 ) : void
StatementModel ( ) : System
StatementModel ( [ logger ) : System
SubscribeToTransactionChangedEvents ( ) : void
ThrowIfDisposed ( ) : void
UnsubscribeToTransactionChangedEvents ( ) : void
UpdateDuration ( ) : void
ValidateAgainstDuplicates ( ) : Transaction>>.IEnumerable

Method Details

CalculateDuration() public static method

Calculates the duration in months from the beginning of the period to the end.
public static CalculateDuration ( GlobalFilterCriteria criteria, IEnumerable transactions ) : int
criteria GlobalFilterCriteria /// The criteria that is currently applied to the Statement. Pass in null to use first and last /// statement dates. ///
transactions IEnumerable The list of transactions to use to determine duration.
return int

Dispose() public method

Implement IDisposable. Do not make this method virtual. A derived class should not be able to override this method
public Dispose ( ) : void
return void

Dispose() protected method

Allows derivatives to customise dispose logic.
protected Dispose ( bool disposing ) : void
disposing bool
return void

SignificantDataChangeHash() public method

Calcuates a hash that represents a data state for the current instance. When the data state changes the hash will change.
public SignificantDataChangeHash ( ) : long
return long