C# Class HaloOnlineLib.Resources.ResourceDataManager

Manages resource caches and extracting/injecting resource data.
Afficher le fichier Open project: dark-c0de/DarkConvert Class Usage Examples

Méthodes publiques

Méthode Description
Extract ( ResourceReference resource, Stream outStream ) : void

Extracts the raw data for a resource.

LoadCache ( ResourceLocation location, string path ) : void

Loads a resource cache from a file.

LoadCachesFromDirectory ( string directory ) : void

Loads resource caches from a directory using their default filenames.

Replace ( ResourceReference resource, Stream dataStream ) : void

Replaces the raw data for a resource.

Private Methods

Méthode Description
GetCache ( ResourceReference resource ) : LoadedCache

Method Details

Extract() public méthode

Extracts the raw data for a resource.
Thrown if the output stream is not open for writing. Thrown if the file containing the resource has not been loaded.
public Extract ( ResourceReference resource, Stream outStream ) : void
resource ResourceReference The resource.
outStream Stream The stream to write the extracted data to.
Résultat void

LoadCache() public méthode

Loads a resource cache from a file.
Thrown if the cache is already loaded.
public LoadCache ( ResourceLocation location, string path ) : void
location ResourceLocation The resource cache type.
path string The path to the .dat file to read.
Résultat void

LoadCachesFromDirectory() public méthode

Loads resource caches from a directory using their default filenames.
public LoadCachesFromDirectory ( string directory ) : void
directory string The directory to find files in.
Résultat void

Replace() public méthode

Replaces the raw data for a resource.
Thrown if the input stream is not open for reading.
public Replace ( ResourceReference resource, Stream dataStream ) : void
resource ResourceReference The resource whose data should be replaced. On success, the reference will be adjusted to account for the new data.
dataStream Stream The stream to read the new data from.
Résultat void