C# Class BudgetAnalyser.Engine.Services.TransactionRuleService

Inheritance: ITransactionRuleService, ISupportsModelPersistence
Mostrar archivo Open project: Benrnz/BudgetAnalyser Class Usage Examples

Public Methods

Method Description
Close ( ) : void
CreateAsync ( ApplicationDatabase applicationDatabase ) : System.Threading.Tasks.Task
CreateNewRule ( string bucketCode, string description, string references, string transactionTypeName, decimal amount, bool andMatching ) : MatchingRule
CreateNewSingleUseRule ( string bucketCode, string description, string references, string transactionTypeName, decimal amount, bool andMatching ) : SingleUseMatchingRule
IsRuleSimilar ( SimilarMatchedRule rule, DecimalCriteria amount, StringCriteria description, StringCriteria references, StringCriteria transactionTypeName ) : bool
LoadAsync ( ApplicationDatabase applicationDatabase ) : System.Threading.Tasks.Task
Match ( IEnumerable transactions ) : bool
RemoveRule ( MatchingRule ruleToRemove ) : bool
SaveAsync ( ApplicationDatabase applicationDatabase ) : System.Threading.Tasks.Task
SavePreview ( ) : void
TransactionRuleService ( [ ruleRepository, [ logger, [ matchmaker, [ ruleFactory, [ environmentFolders, [ monitorableDependencies ) : System
ValidateModel ( StringBuilder messages ) : bool

Protected Methods

Method Description
BuildDefaultFileName ( ) : Task

Private Methods

Method Description
AddRule ( MatchingRule ruleToAdd ) : void
InitialiseTheRulesCollections ( List repoRules ) : void
IsSimilarRulePreconditions ( SimilarMatchedRule rule, DecimalCriteria amount, StringCriteria description, StringCriteria references, StringCriteria transactionType ) : void

Method Details

BuildDefaultFileName() protected method

protected BuildDefaultFileName ( ) : Task
return Task

Close() public method

public Close ( ) : void
return void

CreateAsync() public method

public CreateAsync ( ApplicationDatabase applicationDatabase ) : System.Threading.Tasks.Task
applicationDatabase BudgetAnalyser.Engine.Persistence.ApplicationDatabase
return System.Threading.Tasks.Task

CreateNewRule() public method

public CreateNewRule ( string bucketCode, string description, string references, string transactionTypeName, decimal amount, bool andMatching ) : MatchingRule
bucketCode string
description string
references string
transactionTypeName string
amount decimal
andMatching bool
return MatchingRule

CreateNewSingleUseRule() public method

public CreateNewSingleUseRule ( string bucketCode, string description, string references, string transactionTypeName, decimal amount, bool andMatching ) : SingleUseMatchingRule
bucketCode string
description string
references string
transactionTypeName string
amount decimal
andMatching bool
return BudgetAnalyser.Engine.Matching.SingleUseMatchingRule

IsRuleSimilar() public method

public IsRuleSimilar ( SimilarMatchedRule rule, DecimalCriteria amount, StringCriteria description, StringCriteria references, StringCriteria transactionTypeName ) : bool
rule BudgetAnalyser.Engine.Matching.SimilarMatchedRule
amount DecimalCriteria
description StringCriteria
references StringCriteria
transactionTypeName StringCriteria
return bool

LoadAsync() public method

public LoadAsync ( ApplicationDatabase applicationDatabase ) : System.Threading.Tasks.Task
applicationDatabase BudgetAnalyser.Engine.Persistence.ApplicationDatabase
return System.Threading.Tasks.Task

Match() public method

public Match ( IEnumerable transactions ) : bool
transactions IEnumerable
return bool

RemoveRule() public method

public RemoveRule ( MatchingRule ruleToRemove ) : bool
ruleToRemove MatchingRule
return bool

SaveAsync() public method

public SaveAsync ( ApplicationDatabase applicationDatabase ) : System.Threading.Tasks.Task
applicationDatabase BudgetAnalyser.Engine.Persistence.ApplicationDatabase
return System.Threading.Tasks.Task

SavePreview() public method

public SavePreview ( ) : void
return void

TransactionRuleService() public method

public TransactionRuleService ( [ ruleRepository, [ logger, [ matchmaker, [ ruleFactory, [ environmentFolders, [ monitorableDependencies ) : System
ruleRepository [
logger [
matchmaker [
ruleFactory [
environmentFolders [
monitorableDependencies [
return System

ValidateModel() public method

public ValidateModel ( StringBuilder messages ) : bool
messages StringBuilder
return bool