Class LocaleFileInfo
Provides properties and instance methods for reading and writing Free Realms locale files.
Inherited Members
Namespace: FreeRealmsLocaleTools.LocaleParser
Assembly: FreeRealmsLocaleTools.dll
Syntax
public class LocaleFileInfo
Constructors
| Name | Description |
|---|---|
| LocaleFileInfo() | Initializes an empty instance of LocaleFileInfo. |
| LocaleFileInfo(string, bool) | Initializes a new instance of LocaleFileInfo from the specified locale .dat file. |
| LocaleFileInfo(string, string, ParseOptions, bool) | Initializes a new instance of LocaleFileInfo from the specified locale .dat and .dir file. |
Properties
| Name | Description |
|---|---|
| CanAddEntries | Gets whether adding locale entries is supported. |
| Entries | Gets the locale entries read from the .dat file. |
| HashToEntry | Gets a sorted mapping from hashes to locale entries. |
| IdToEntry | Gets a sorted mapping from IDs to locale entries. |
| LocaleDatFile | Gets the locale .dat file. |
| LocaleDirFile | Gets the locale .dir file, or the locale .dat file with its extension changed to ".dir" if no .dir file was not given. |
| Locations | Gets the locale entry locations read from the .dir file, or an empty array if no .dir file was given. |
| Metadata | Gets the locale metadata. |
| Preamble | Gets the preamble bytes at the beginning of the locale .dat file. |
| StoredEntries | Gets a view of the stored locale entries, including updates, ordered by hash. |
Methods
| Name | Description |
|---|---|
| AddEntries(IEnumerable<string>) | Adds the specified collection of strings as locale entries. |
| AddEntry(string) | Adds a locale entry with the specified text. |
| RemoveEntries(Func<LocaleEntry, bool>) | Removes all entries that match the specified predicate. |
| RemoveEntries(string) | Removes all entries with the specified text. |
| RemoveEntry(int) | Removes the entry with the specified ID. |
| UpdateEntries(IDictionary<string, string>) | Replaces the text of all entries matching keys in the dictionary with the corresponding values. |
| UpdateEntries(IEnumerable<string>, IEnumerable<string>) | Replaces the text of entries matching the first sequence with the corresponding text from the second sequence. |
| UpdateEntries(IEnumerable<(string, string)>) | Replaces the text of entries matching the first item with the second item in the sequence. |
| UpdateEntries(Func<LocaleEntry, bool>, Func<LocaleEntry, string>) | Replaces the text from all entries that match the specified predicate with the text from the given selector. |
| UpdateEntries(Func<LocaleEntry, bool>, string) | Replaces the text from all entries that match the specified predicate with the specified text. |
| UpdateEntries(string, string) | Replaces the text of all entries that have the specified old text with the new text. |
| UpdateEntry(int, string) | Replaces the text of the entry with the given ID with the specified text. |
| WriteEntries() | Writes the stored locale entries to the .dat file and .dir file specified upon creation of this instance. |
| WriteEntries(FileInfo, FileInfo) | Writes the stored locale entries to the specified .dat file and .dir file. |
| WriteEntries(string, string) | Writes the stored locale entries to the specified .dat file and .dir file. |