C# Class BudgetAnalyser.Engine.Persistence.XamlOnDiskApplicationDatabaseRepository

Inheritance: IApplicationDatabaseRepository
Afficher le fichier Open project: Benrnz/BudgetAnalyser

Méthodes publiques

Méthode Description
CreateNewAsync ( string storageKey ) : Task

Creates a new budget analyser database graph.

LoadAsync ( string storageKey ) : Task

Loads the Budget Analyser database graph from persistent storage.

SaveAsync ( ApplicationDatabase budgetAnalyserDatabase ) : System.Threading.Tasks.Task

Saves the Budget Analyser database graph to persistent storage.

XamlOnDiskApplicationDatabaseRepository ( ApplicationDatabase>.[ mapper ) : System

Initializes a new instance of the XamlOnDiskApplicationDatabaseRepository class.

Méthodes protégées

Méthode Description
FileExists ( string budgetAnalyserDataStorage ) : bool

Checks to see if the budget analyser identified by the budgetAnalyserDataStorage exists in storage or not.

LoadXamlAsString ( string fileName ) : string

Loads the xaml as a string.

Serialise ( BudgetAnalyserStorageRoot budgetAnalyserDatabase ) : string

Serialises the specified budget analyser database to a Xaml string.

WriteToDiskAsync ( string fileName, string data ) : System.Threading.Tasks.Task

Writes the data to local disk.

Private Methods

Méthode Description
LoadXmlFromDiskAsync ( string fileName ) : Task

Method Details

CreateNewAsync() public méthode

Creates a new budget analyser database graph.
public CreateNewAsync ( string storageKey ) : Task
storageKey string
Résultat Task

FileExists() protected méthode

Checks to see if the budget analyser identified by the budgetAnalyserDataStorage exists in storage or not.
protected FileExists ( string budgetAnalyserDataStorage ) : bool
budgetAnalyserDataStorage string The budget analyser data storage.
Résultat bool

LoadAsync() public méthode

Loads the Budget Analyser database graph from persistent storage.
File does not exist. /// Deserialisation Application Database file failed, an exception was thrown by the /// Xml deserialiser, the file format is invalid. ///
public LoadAsync ( string storageKey ) : Task
storageKey string
Résultat Task

LoadXamlAsString() protected méthode

Loads the xaml as a string.
protected LoadXamlAsString ( string fileName ) : string
fileName string Name of the file.
Résultat string

SaveAsync() public méthode

Saves the Budget Analyser database graph to persistent storage.
public SaveAsync ( ApplicationDatabase budgetAnalyserDatabase ) : System.Threading.Tasks.Task
budgetAnalyserDatabase ApplicationDatabase The budget analyser database.
Résultat System.Threading.Tasks.Task

Serialise() protected méthode

Serialises the specified budget analyser database to a Xaml string.
protected Serialise ( BudgetAnalyserStorageRoot budgetAnalyserDatabase ) : string
budgetAnalyserDatabase BudgetAnalyserStorageRoot The budget analyser database.
Résultat string

WriteToDiskAsync() protected méthode

Writes the data to local disk.
protected WriteToDiskAsync ( string fileName, string data ) : System.Threading.Tasks.Task
fileName string
data string
Résultat System.Threading.Tasks.Task

XamlOnDiskApplicationDatabaseRepository() public méthode

Initializes a new instance of the XamlOnDiskApplicationDatabaseRepository class.
///
public XamlOnDiskApplicationDatabaseRepository ( ApplicationDatabase>.[ mapper ) : System
mapper ApplicationDatabase>.[
Résultat System