C# Class HaloOnlineLib.Resources.ResourceDataManager

Manages resource caches and extracting/injecting resource data.
显示文件 Open project: dark-c0de/DarkConvert Class Usage Examples

Public Methods

Method 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

Method Description
GetCache ( ResourceReference resource ) : LoadedCache

Method Details

Extract() public method

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.
return void

LoadCache() public method

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.
return void

LoadCachesFromDirectory() public method

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

Replace() public method

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.
return void