C# Класс HaloOnlineLib.Resources.ResourceDataManager

Manages resource caches and extracting/injecting resource data.
Показать файл Открыть проект Примеры использования класса

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

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

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

Метод Описание
GetCache ( ResourceReference resource ) : LoadedCache

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

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

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

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

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

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

Loads resource caches from a directory using their default filenames.
public LoadCachesFromDirectory ( string directory ) : void
directory string The directory to find files in.
Результат void

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

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