C# Class BudgetAnalyser.ApplicationState.PersistApplicationStateAsXaml

An implmentation of IPersistApplicationState that saves the user meta-data as Xaml to a file on the local disk.
Inheritance: IPersistApplicationState
ファイルを表示 Open project: Benrnz/BudgetAnalyser

Public Methods

Method Description
Load ( ) : IEnumerable

Load the user state from the Xaml file on the local disk.

Persist ( IEnumerable modelsToPersist ) : void

Persist the user data to the Xaml file on the local disk.

PersistApplicationStateAsXaml ( [ userMessageBox ) : System

Initializes a new instance of the PersistApplicationStateAsXaml class.

Private Methods

Method Description
HandleCorruptFileGracefully ( Exception ex ) : IEnumerable

Method Details

Load() public method

Load the user state from the Xaml file on the local disk.
/// This will be thrown if the file is /// invalid. ///
public Load ( ) : IEnumerable
return IEnumerable

Persist() public method

Persist the user data to the Xaml file on the local disk.
public Persist ( IEnumerable modelsToPersist ) : void
modelsToPersist IEnumerable /// All components in the App that implement so /// the implementation can go get the data to persist. ///
return void

PersistApplicationStateAsXaml() public method

Initializes a new instance of the PersistApplicationStateAsXaml class.
userMessageBox cannot be null.
public PersistApplicationStateAsXaml ( [ userMessageBox ) : System
userMessageBox [ A service to show the user a message box.
return System