C# Class Geowigo.Models.CartridgeTag

Provides a static metadata description and cache of a Cartridge.
Inheritance: INotifyPropertyChanged
Show file Open project: WFoundation/WF.Player.WinPhone Class Usage Examples

Public Methods

Method Description
AddSavegame ( CartridgeSavegame cs ) : void

Exports a savegame to the isolated storage and adds it to this tag.

CartridgeTag ( WF.Player.Core.Cartridge cart ) : System

Constructs an uncached CartridgeTag from the basic metadata of a Cartridge.

ClearCache ( ) : void

Removes all cache entries in the isolated storage.

CreateLogFile ( ) : GWL

Creates a new log file for this cartridge tag.

GetLastSavegameNameInteger ( string name, string suffixFormat ) : int

Gets the last integer suffix that matches a pattern of names for savegames currently added to the tag.

GetMediaCachePath ( WF.Player.Core.Media media, bool recacheIfFileNotFound ) : string

Gets the path to the cached version of a media.

GetSavegameByNameOrDefault ( string name ) : CartridgeSavegame

Gets a savegame of this cartridge by name, or null if none is found.

ImportOrMakeCache ( ) : void

Imports or create the cache for this CartridgeTag.

RefreshOrAddSavegame ( CartridgeSavegame cs ) : void

Exports a savegame to the isolated storage and adds it to this tag if it is not already there.

RemoveAllLogs ( ) : void

Removes all logs associated to this cartridge tag from isolated storage.

RemoveAllSavegames ( ) : void

Removes all savegames' contents from this tag and the isolated storage.

RemoveSavegame ( CartridgeSavegame cs ) : void

Removes a savegame's contents from the isolated storage and removes it from this tag.

Private Methods

Method Description
ConvertAndWriteFDL ( IsolatedStorageFileStream fs, WF.Player.Core.Media sound ) : void
GetCachePathCore ( WF.Player.Core.Media media ) : string
GetCachePathCore ( string filename ) : string
GetLogFiles ( IsolatedStorageFile isf ) : IEnumerable
ImportOrMakeSoundsCache ( IsolatedStorageFile isf ) : void
ImportSavegamesCache ( IsolatedStorageFile isf ) : void
RaisePropertyChanged ( string propName ) : void

Method Details

AddSavegame() public method

Exports a savegame to the isolated storage and adds it to this tag.
public AddSavegame ( CartridgeSavegame cs ) : void
cs CartridgeSavegame The savegame to add.
return void

CartridgeTag() public method

Constructs an uncached CartridgeTag from the basic metadata of a Cartridge.
public CartridgeTag ( WF.Player.Core.Cartridge cart ) : System
cart WF.Player.Core.Cartridge
return System

ClearCache() public method

Removes all cache entries in the isolated storage.
public ClearCache ( ) : void
return void

CreateLogFile() public method

Creates a new log file for this cartridge tag.
public CreateLogFile ( ) : GWL
return GWL

GetLastSavegameNameInteger() public method

Gets the last integer suffix that matches a pattern of names for savegames currently added to the tag.
public GetLastSavegameNameInteger ( string name, string suffixFormat ) : int
name string Name of the savegame root
suffixFormat string Format of the integer suffix
return int

GetMediaCachePath() public method

Gets the path to the cached version of a media.
public GetMediaCachePath ( WF.Player.Core.Media media, bool recacheIfFileNotFound ) : string
media WF.Player.Core.Media
recacheIfFileNotFound bool If true, the cache for this media /// is recreated if its theoretical file path was not found. If false, /// null is returned if
return string

GetSavegameByNameOrDefault() public method

Gets a savegame of this cartridge by name, or null if none is found.
public GetSavegameByNameOrDefault ( string name ) : CartridgeSavegame
name string Name of the savegame to find.
return CartridgeSavegame

ImportOrMakeCache() public method

Imports or create the cache for this CartridgeTag.
public ImportOrMakeCache ( ) : void
return void

RefreshOrAddSavegame() public method

Exports a savegame to the isolated storage and adds it to this tag if it is not already there.
public RefreshOrAddSavegame ( CartridgeSavegame cs ) : void
cs CartridgeSavegame
return void

RemoveAllLogs() public method

Removes all logs associated to this cartridge tag from isolated storage.
public RemoveAllLogs ( ) : void
return void

RemoveAllSavegames() public method

Removes all savegames' contents from this tag and the isolated storage.
public RemoveAllSavegames ( ) : void
return void

RemoveSavegame() public method

Removes a savegame's contents from the isolated storage and removes it from this tag.
public RemoveSavegame ( CartridgeSavegame cs ) : void
cs CartridgeSavegame
return void