C# Class Geowigo.Models.CartridgeTag

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

Méthodes publiques

Méthode 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

Méthode 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 méthode

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

CartridgeTag() public méthode

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

ClearCache() public méthode

Removes all cache entries in the isolated storage.
public ClearCache ( ) : void
Résultat void

CreateLogFile() public méthode

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

GetLastSavegameNameInteger() public méthode

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
Résultat int

GetMediaCachePath() public méthode

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
Résultat string

GetSavegameByNameOrDefault() public méthode

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.
Résultat CartridgeSavegame

ImportOrMakeCache() public méthode

Imports or create the cache for this CartridgeTag.
public ImportOrMakeCache ( ) : void
Résultat void

RefreshOrAddSavegame() public méthode

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
Résultat void

RemoveAllLogs() public méthode

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

RemoveAllSavegames() public méthode

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

RemoveSavegame() public méthode

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