C# Class PaulStovell.TrialBalance.DomainModel.DataProvider

Represents the class that creates, loads and persists data to the data source.
Afficher le fichier Open project: PaulStovell/trial-balance

Méthodes publiques

Méthode Description
CreateTransaction ( ) : Transaction

Creates a transaction.

DeleteAccount ( Account account ) : void

Deletes a given account.

DeleteTransaction ( IList transactions ) : void

Deletes a list of transactions from the data source.

DeleteTransaction ( Transaction transaction ) : void

Deletes a given transaction from the data source.

FetchAccount ( System.Guid accountID ) : Account

Retrieves an account from the data store.

FetchAccountIDs ( ) : IList

Retrieves a list of the ID's of all accounts in the data store.

FetchAsset ( System.Guid assetID ) : Asset

Retrieves an asset for the current business from the data store.

FetchAssetIDs ( ) : IList

Retrieves all assets for the current business from the data store.

FetchEquity ( System.Guid equityID ) : Equity

Retrieves an equity account for the current business from the data store given the unique identifier for the equity.

FetchEquityIDs ( ) : IList

Retrieves all equity accounts for the current business from the data store.

FetchExpense ( System.Guid expenseID ) : Expense

Retrieves an expense account for the current business from the data store given the unique identifier for the expense.

FetchExpenseIDs ( ) : IList

Retrieves all expense accounts for the current business from the data store.

FetchLiability ( System.Guid liabilityID ) : Liability

Retrieves a liability for the current business from the data store given the unique identifier for the liability.

FetchLiabilityIDs ( ) : IList

Retrieves all liabilities for the current business from the data store.

FetchRevenue ( System.Guid revenueID ) : Revenue

Retrieves a revenue account for the current business from the data store given the unique identifier for the revenue.

FetchRevenueIDs ( ) : IList

Retrieves all revenue accounts for the current business from the data store.

FetchSetting ( string name ) : string

Retrieves a given setting from the data source.

FetchTransactions ( Workbook workbook, Account account ) : TransactionCollection

Loads all transactions for the current business from the data source that were applied to a given account.

PersistAsset ( Asset asset ) : void

Saves a given asset.

PersistEquity ( Equity equity ) : void

Saves an equity account to the data store.

PersistExpense ( Expense expense ) : void

Saves an expense account to the data store.

PersistLiability ( Liability liability ) : void

Saves a liability account to the data store.

PersistRevenue ( Revenue revenue ) : void

Saves a revenue account to the data store.

PersistSetting ( string name, string value ) : void

Saves a given setting.

PersistTransaction ( Transaction transaction ) : void

Saves a given transaction to the data store.

PersistTransactions ( IList transactions ) : void

Saves a list of transactions to the data store.

Method Details

CreateTransaction() public méthode

Creates a transaction.
public CreateTransaction ( ) : Transaction
Résultat Transaction

DeleteAccount() public abstract méthode

Deletes a given account.
public abstract DeleteAccount ( Account account ) : void
account Account The account to delete.
Résultat void

DeleteTransaction() public méthode

Deletes a list of transactions from the data source.
public DeleteTransaction ( IList transactions ) : void
transactions IList The transactions to delete.
Résultat void

DeleteTransaction() public abstract méthode

Deletes a given transaction from the data source.
public abstract DeleteTransaction ( Transaction transaction ) : void
transaction Transaction The transaction to delete.
Résultat void

FetchAccount() public abstract méthode

Retrieves an account from the data store.
public abstract FetchAccount ( System.Guid accountID ) : Account
accountID System.Guid The ID of the account.
Résultat Account

FetchAccountIDs() public abstract méthode

Retrieves a list of the ID's of all accounts in the data store.
public abstract FetchAccountIDs ( ) : IList
Résultat IList

FetchAsset() public abstract méthode

Retrieves an asset for the current business from the data store.
public abstract FetchAsset ( System.Guid assetID ) : Asset
assetID System.Guid
Résultat Asset

FetchAssetIDs() public abstract méthode

Retrieves all assets for the current business from the data store.
public abstract FetchAssetIDs ( ) : IList
Résultat IList

FetchEquity() public abstract méthode

Retrieves an equity account for the current business from the data store given the unique identifier for the equity.
public abstract FetchEquity ( System.Guid equityID ) : Equity
equityID System.Guid
Résultat Equity

FetchEquityIDs() public abstract méthode

Retrieves all equity accounts for the current business from the data store.
public abstract FetchEquityIDs ( ) : IList
Résultat IList

FetchExpense() public abstract méthode

Retrieves an expense account for the current business from the data store given the unique identifier for the expense.
public abstract FetchExpense ( System.Guid expenseID ) : Expense
expenseID System.Guid
Résultat Expense

FetchExpenseIDs() public abstract méthode

Retrieves all expense accounts for the current business from the data store.
public abstract FetchExpenseIDs ( ) : IList
Résultat IList

FetchLiability() public abstract méthode

Retrieves a liability for the current business from the data store given the unique identifier for the liability.
public abstract FetchLiability ( System.Guid liabilityID ) : Liability
liabilityID System.Guid
Résultat Liability

FetchLiabilityIDs() public abstract méthode

Retrieves all liabilities for the current business from the data store.
public abstract FetchLiabilityIDs ( ) : IList
Résultat IList

FetchRevenue() public abstract méthode

Retrieves a revenue account for the current business from the data store given the unique identifier for the revenue.
public abstract FetchRevenue ( System.Guid revenueID ) : Revenue
revenueID System.Guid
Résultat Revenue

FetchRevenueIDs() public abstract méthode

Retrieves all revenue accounts for the current business from the data store.
public abstract FetchRevenueIDs ( ) : IList
Résultat IList

FetchSetting() public abstract méthode

Retrieves a given setting from the data source.
public abstract FetchSetting ( string name ) : string
name string The name of the setting to retrieve.
Résultat string

FetchTransactions() public abstract méthode

Loads all transactions for the current business from the data source that were applied to a given account.
public abstract FetchTransactions ( Workbook workbook, Account account ) : TransactionCollection
workbook Workbook /// The workbook used to associate the loaded transactions with. ///
account Account The account that will be used to search for transactions.
Résultat TransactionCollection

PersistAsset() public abstract méthode

Saves a given asset.
public abstract PersistAsset ( Asset asset ) : void
asset Asset The asset to save.
Résultat void

PersistEquity() public abstract méthode

Saves an equity account to the data store.
public abstract PersistEquity ( Equity equity ) : void
equity Equity The equity account to save.
Résultat void

PersistExpense() public abstract méthode

Saves an expense account to the data store.
public abstract PersistExpense ( Expense expense ) : void
expense Expense The expense account to save.
Résultat void

PersistLiability() public abstract méthode

Saves a liability account to the data store.
public abstract PersistLiability ( Liability liability ) : void
liability Liability The liability to save.
Résultat void

PersistRevenue() public abstract méthode

Saves a revenue account to the data store.
public abstract PersistRevenue ( Revenue revenue ) : void
revenue Revenue The revenue account to save.
Résultat void

PersistSetting() public abstract méthode

Saves a given setting.
public abstract PersistSetting ( string name, string value ) : void
name string The name of the setting.
value string The value of the setting.
Résultat void

PersistTransaction() public abstract méthode

Saves a given transaction to the data store.
public abstract PersistTransaction ( Transaction transaction ) : void
transaction Transaction The transaction to save.
Résultat void

PersistTransactions() public méthode

Saves a list of transactions to the data store.
public PersistTransactions ( IList transactions ) : void
transactions IList A list of transactions to save.
Résultat void