C# Класс TagTool.Cache.StringIDCache

A file containing a cache of all of the stringID strings.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
Add ( string str ) : StringID

Adds a string to the cache.

GetString ( StringID stringId ) : string

Gets the string corresponding to a stringID.

GetStringID ( int strIndex ) : StringID

Gets the stringID corresponding to a string list index.

GetStringID ( string str ) : StringID

Gets the stringID corresponding to a string in the list.

Save ( Stream stream ) : void

Saves the string data back to the file.

StringIDCache ( Stream stream, StringIDResolverBase resolver ) : System

Loads a stringID cache from a string_ids.dat file.

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

Метод Описание
Load ( Stream stream ) : void

Loads the cache from a stream.

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

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

Adds a string to the cache.
public Add ( string str ) : StringID
str string The string to add.
Результат StringID

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

Gets the string corresponding to a stringID.
public GetString ( StringID stringId ) : string
stringId StringID The stringID.
Результат string

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

Gets the stringID corresponding to a string list index.
public GetStringID ( int strIndex ) : StringID
strIndex int The string list index to convert.
Результат StringID

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

Gets the stringID corresponding to a string in the list.
public GetStringID ( string str ) : StringID
str string The string to search for.
Результат StringID

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

Saves the string data back to the file.
public Save ( Stream stream ) : void
stream Stream The stream to write to.
Результат void

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

Loads a stringID cache from a string_ids.dat file.
public StringIDCache ( Stream stream, StringIDResolverBase resolver ) : System
stream Stream The stream to read from.
resolver StringIDResolverBase The stringID resolver to use.
Результат System