C# Class BeatMachine.Model.DataModel

Inheritance: ViewModelBase
Afficher le fichier Open project: yavorg/Beat-Machine Class Usage Examples

Méthodes publiques

Méthode Description
AnalyzeSongs ( object state ) : void
AnalyzeSongs_CatalogUpdateCompleted ( object sender, BeatMachine.EchoNest.EchoNestApiEventArgs e ) : void
DataModel ( ) : System
DiffSongs ( object state ) : void
DownloadAnalyzedSongs ( object state ) : void
DownloadAnalyzedSongsAlreadyInRemoteCatalog ( object state ) : void
DownloadAnalyzedSongsAlreadyInRemoteCatalog_CatalogReadCompleted ( object sender, BeatMachine.EchoNest.EchoNestApiEventArgs e ) : void
DownloadAnalyzedSongs_CatalogReadCompleted ( object sender, BeatMachine.EchoNest.EchoNestApiEventArgs e ) : void
GetAnalyzedSongs ( object state ) : void
GetSongsOnDevice ( object state ) : void
Initialize ( ) : void
LoadCatalogId ( object state ) : void

Ensures Model.CatalogId is populated. Will try the following: 1. Try loading it from the "CatalogId" setting in storage 2. If (1) is successful, it will try reading 1 song from the catalog to make sure it is there on the web service 3. If (1) or (2) fails, it will create a new catalog on the web service

LoadCatalogIdNeedsToCheckCatalogId_CatalogUpdateCompleted ( object sender, BeatMachine.EchoNest.EchoNestApiEventArgs e ) : void
LoadCatalogIdNeedsToCreateCatalog_CatalogCreateCompleted ( object sender, BeatMachine.EchoNest.EchoNestApiEventArgs e ) : void
RunWorkflow ( string eventPropertyName ) : void

This method will look at the state of this object and run the remaining steps in the workflow to make sure the data is fully loaded. This is useful in situaltions where the model may get serialized and stored, and then needs to be able to resume loading based on its state.

Private Methods

Méthode Description
AnalyzeSongsNeedsToRunAgain ( ) : void
CreateApiInstance ( ) : BeatMachine.EchoNest.EchoNestApi
DownloadAnalyzedSongsAlreadyInRemoteCatalogNeedsToRunAgain ( ) : void
DownloadAnalyzedSongsNeedsToRunAgain ( ) : void
LoadCatalogIdNeedsToCheckCatalogId ( string id ) : void
LoadCatalogIdNeedsToCreateCatalog ( ) : void
LoadCatalogIdNeedsToRunAgain ( ) : void
PropertyNameMatchesEventName ( string propertyName, string eventPropertyName ) : bool
StoreDownloadedSongs ( BeatMachine.EchoNest.Model.Catalog cat ) : void

Method Details

AnalyzeSongs() public méthode

public AnalyzeSongs ( object state ) : void
state object
Résultat void

AnalyzeSongs_CatalogUpdateCompleted() public méthode

public AnalyzeSongs_CatalogUpdateCompleted ( object sender, BeatMachine.EchoNest.EchoNestApiEventArgs e ) : void
sender object
e BeatMachine.EchoNest.EchoNestApiEventArgs
Résultat void

DataModel() public méthode

public DataModel ( ) : System
Résultat System

DiffSongs() public méthode

public DiffSongs ( object state ) : void
state object
Résultat void

DownloadAnalyzedSongs() public méthode

public DownloadAnalyzedSongs ( object state ) : void
state object
Résultat void

DownloadAnalyzedSongsAlreadyInRemoteCatalog() public méthode

public DownloadAnalyzedSongsAlreadyInRemoteCatalog ( object state ) : void
state object
Résultat void

DownloadAnalyzedSongsAlreadyInRemoteCatalog_CatalogReadCompleted() public méthode

public DownloadAnalyzedSongsAlreadyInRemoteCatalog_CatalogReadCompleted ( object sender, BeatMachine.EchoNest.EchoNestApiEventArgs e ) : void
sender object
e BeatMachine.EchoNest.EchoNestApiEventArgs
Résultat void

DownloadAnalyzedSongs_CatalogReadCompleted() public méthode

public DownloadAnalyzedSongs_CatalogReadCompleted ( object sender, BeatMachine.EchoNest.EchoNestApiEventArgs e ) : void
sender object
e BeatMachine.EchoNest.EchoNestApiEventArgs
Résultat void

GetAnalyzedSongs() public méthode

public GetAnalyzedSongs ( object state ) : void
state object
Résultat void

GetSongsOnDevice() public méthode

public GetSongsOnDevice ( object state ) : void
state object
Résultat void

Initialize() public méthode

public Initialize ( ) : void
Résultat void

LoadCatalogId() public méthode

Ensures Model.CatalogId is populated. Will try the following: 1. Try loading it from the "CatalogId" setting in storage 2. If (1) is successful, it will try reading 1 song from the catalog to make sure it is there on the web service 3. If (1) or (2) fails, it will create a new catalog on the web service
public LoadCatalogId ( object state ) : void
state object
Résultat void

LoadCatalogIdNeedsToCheckCatalogId_CatalogUpdateCompleted() public méthode

public LoadCatalogIdNeedsToCheckCatalogId_CatalogUpdateCompleted ( object sender, BeatMachine.EchoNest.EchoNestApiEventArgs e ) : void
sender object
e BeatMachine.EchoNest.EchoNestApiEventArgs
Résultat void

LoadCatalogIdNeedsToCreateCatalog_CatalogCreateCompleted() public méthode

public LoadCatalogIdNeedsToCreateCatalog_CatalogCreateCompleted ( object sender, BeatMachine.EchoNest.EchoNestApiEventArgs e ) : void
sender object
e BeatMachine.EchoNest.EchoNestApiEventArgs
Résultat void

RunWorkflow() public méthode

This method will look at the state of this object and run the remaining steps in the workflow to make sure the data is fully loaded. This is useful in situaltions where the model may get serialized and stored, and then needs to be able to resume loading based on its state.
public RunWorkflow ( string eventPropertyName ) : void
eventPropertyName string An optional eventPropertyName, /// to be used if this is attached as part of a property /// changed handler. If not used as part of the handler, /// set this to null.
Résultat void