C# Класс BeatMachine.Model.DataModel

Наследование: ViewModelBase
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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

Описание методов

AnalyzeSongs() публичный Метод

public AnalyzeSongs ( object state ) : void
state object
Результат void

AnalyzeSongs_CatalogUpdateCompleted() публичный Метод

public AnalyzeSongs_CatalogUpdateCompleted ( object sender, BeatMachine.EchoNest.EchoNestApiEventArgs e ) : void
sender object
e BeatMachine.EchoNest.EchoNestApiEventArgs
Результат void

DataModel() публичный Метод

public DataModel ( ) : System
Результат System

DiffSongs() публичный Метод

public DiffSongs ( object state ) : void
state object
Результат void

DownloadAnalyzedSongs() публичный Метод

public DownloadAnalyzedSongs ( object state ) : void
state object
Результат void

DownloadAnalyzedSongsAlreadyInRemoteCatalog() публичный Метод

public DownloadAnalyzedSongsAlreadyInRemoteCatalog ( object state ) : void
state object
Результат void

DownloadAnalyzedSongsAlreadyInRemoteCatalog_CatalogReadCompleted() публичный Метод

public DownloadAnalyzedSongsAlreadyInRemoteCatalog_CatalogReadCompleted ( object sender, BeatMachine.EchoNest.EchoNestApiEventArgs e ) : void
sender object
e BeatMachine.EchoNest.EchoNestApiEventArgs
Результат void

DownloadAnalyzedSongs_CatalogReadCompleted() публичный Метод

public DownloadAnalyzedSongs_CatalogReadCompleted ( object sender, BeatMachine.EchoNest.EchoNestApiEventArgs e ) : void
sender object
e BeatMachine.EchoNest.EchoNestApiEventArgs
Результат void

GetAnalyzedSongs() публичный Метод

public GetAnalyzedSongs ( object state ) : void
state object
Результат void

GetSongsOnDevice() публичный Метод

public GetSongsOnDevice ( object state ) : void
state object
Результат void

Initialize() публичный Метод

public Initialize ( ) : void
Результат void

LoadCatalogId() публичный Метод

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
Результат void

LoadCatalogIdNeedsToCheckCatalogId_CatalogUpdateCompleted() публичный Метод

public LoadCatalogIdNeedsToCheckCatalogId_CatalogUpdateCompleted ( object sender, BeatMachine.EchoNest.EchoNestApiEventArgs e ) : void
sender object
e BeatMachine.EchoNest.EchoNestApiEventArgs
Результат void

LoadCatalogIdNeedsToCreateCatalog_CatalogCreateCompleted() публичный Метод

public LoadCatalogIdNeedsToCreateCatalog_CatalogCreateCompleted ( object sender, BeatMachine.EchoNest.EchoNestApiEventArgs e ) : void
sender object
e BeatMachine.EchoNest.EchoNestApiEventArgs
Результат void

RunWorkflow() публичный Метод

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.
Результат void