Class LocalizedTableT<TEntry>
Inheritance
LocalizedTableT<TEntry>
Syntax
public abstract class LocalizedTableT<TEntry> : LocalizedTable, IMetadataCollection, IComparable<LocalizedTable>, IDictionary<uint, TEntry>, ICollection<KeyValuePair<uint, TEntry>>, IEnumerable<KeyValuePair<uint, TEntry>>, IEnumerable, ISerializationCallbackReceiver where TEntry : TableEntry
Type Parameters
Properties
Count
The number of entries in this Table.
Declaration
public int Count { get; }
Property Value
IsReadOnly
Will always be false. Implemented because it is required by the System.Collections.IList interface.
Declaration
public bool IsReadOnly { get; }
Property Value
Item[String]
Get/Set a value using the specified key name.
Declaration
public TEntry this[string keyName] { get; set; }
Parameters
Type |
Name |
Description |
String |
keyName |
|
Property Value
Item[UInt32]
Get/Set a value using the specified key.
Declaration
public TEntry this[uint key] { get; set; }
Parameters
Type |
Name |
Description |
UInt32 |
key |
|
Property Value
Values
All values in this table.
Declaration
public ICollection<TEntry> Values { get; }
Property Value
Methods
Add(KeyValuePair<UInt32, TEntry>)
Adds the item value with the specified keyId.
Declaration
public void Add(KeyValuePair<uint, TEntry> item)
Parameters
Add(UInt32, TEntry)
Adds the entry with the specified keyId.
Declaration
public void Add(uint keyId, TEntry value)
Parameters
Type |
Name |
Description |
UInt32 |
keyId |
|
TEntry |
value |
|
AddEntry(String, String)
Add or update an entry in the table.
Declaration
public TEntry AddEntry(string key, string localized)
Parameters
Returns
AddEntry(UInt32, String)
Add or update an entry in the table.
Declaration
public virtual TEntry AddEntry(uint keyId, string localized)
Parameters
Returns
AddEntryFromReference(TableEntryReference, String)
Add or update an entry in the table.
Declaration
public TEntry AddEntryFromReference(TableEntryReference entryReference, string localized)
Parameters
Returns
Clear()
Clear all entries in this table.
Declaration
Contains(KeyValuePair<UInt32, TEntry>)
Returns true if the table contains the item.
Declaration
public bool Contains(KeyValuePair<uint, TEntry> item)
Parameters
Returns
ContainsKey(UInt32)
Returns true if the table contains an entry with the keyId.
Declaration
public bool ContainsKey(uint keyId)
Parameters
Type |
Name |
Description |
UInt32 |
keyId |
|
Returns
ContainsValue(String)
Returns true if the table contains an entry with the same value.
Declaration
public bool ContainsValue(string localized)
Parameters
Type |
Name |
Description |
String |
localized |
The value to check for in all table entries.
|
Returns
Type |
Description |
Boolean |
True if a match was found else false.
|
CopyTo(KeyValuePair<UInt32, TEntry>[], Int32)
Copies the contents of the table into an array starting at the arrayIndex.
Declaration
public void CopyTo(KeyValuePair<uint, TEntry>[] array, int arrayIndex)
Parameters
CreateEmpty(TableEntryReference)
Create an empty entry in the table at the specified entry.
Declaration
public override void CreateEmpty(TableEntryReference entryReference)
Parameters
Overrides
CreateTableEntry()
Returns a new instance of TEntry.
Declaration
public abstract TEntry CreateTableEntry()
Returns
GetEntry(String)
Returns the entry for the key or null if one does not exist.
Declaration
public TEntry GetEntry(string key)
Parameters
Type |
Name |
Description |
String |
key |
|
Returns
GetEntry(UInt32)
Returns the entry for the key id or null if one does not exist.
Declaration
public virtual TEntry GetEntry(uint keyId)
Parameters
Type |
Name |
Description |
UInt32 |
keyId |
|
Returns
GetEntryFromReference(TableEntryReference)
Returns the entry reference or null if one does not exist.
Declaration
public TEntry GetEntryFromReference(TableEntryReference entryReference)
Parameters
Returns
GetEnumerator()
Return an enumerator for the entries in this table.
Declaration
public IEnumerator<KeyValuePair<uint, TEntry>> GetEnumerator()
Returns
OnAfterDeserialize()
Converts the serialized data into UnityEngine.Localization.Tables.LocalizedTableT`1.m_TableEntries.
Declaration
public void OnAfterDeserialize()
OnBeforeSerialize()
Declaration
public void OnBeforeSerialize()
Remove(KeyValuePair<UInt32, TEntry>)
Remove the item from the table if it exists.
Declaration
public bool Remove(KeyValuePair<uint, TEntry> item)
Parameters
Returns
Remove(UInt32)
Remove the entry with the keyId.
Declaration
public bool Remove(uint keyId)
Parameters
Type |
Name |
Description |
UInt32 |
keyId |
|
Returns
RemoveEntry(String)
Remove an entry from the table if it exists.
Declaration
public bool RemoveEntry(string key)
Parameters
Type |
Name |
Description |
String |
key |
The name of the key.
|
Returns
Type |
Description |
Boolean |
True if the entry was found and removed.
|
RemoveEntry(UInt32)
Remove an entry from the table if it exists.
Declaration
public virtual bool RemoveEntry(uint keyId)
Parameters
Type |
Name |
Description |
UInt32 |
keyId |
The key id to remove.
|
Returns
Type |
Description |
Boolean |
True if the entry was found and removed.
|
ToString()
Creates a string representation of the table as "{TableCollectionName}({LocaleIdentifier})".
Declaration
public override string ToString()
Returns
Overrides
TryGetValue(UInt32, out TEntry)
Find the entry, if it exists in the table.
Declaration
public bool TryGetValue(uint keyId, out TEntry value)
Parameters
Type |
Name |
Description |
UInt32 |
keyId |
|
TEntry |
value |
|
Returns
Type |
Description |
Boolean |
Trus if the entry was found.
|