|
Dictionary< string, object > | dict = new Dictionary<string, object>() |
|
Definition at line 14 of file TagCompound.cs.
void Terraria.ModLoader.IO.TagCompound.Add |
( |
string |
key, |
|
|
object |
value |
|
) |
| |
void Terraria.ModLoader.IO.TagCompound.Add |
( |
KeyValuePair< string, object > |
entry | ) |
|
void Terraria.ModLoader.IO.TagCompound.Clear |
( |
| ) |
|
object Terraria.ModLoader.IO.TagCompound.Clone |
( |
| ) |
|
Definition at line 99 of file TagCompound.cs.
100 var copy =
new TagCompound();
101 foreach (var entry
in this)
102 copy.Set(entry.Key, TagIO.Clone(entry.Value));
bool Terraria.ModLoader.IO.TagCompound.ContainsKey |
( |
string |
key | ) |
|
T Terraria.ModLoader.IO.TagCompound.Get< T > |
( |
string |
key | ) |
|
Definition at line 17 of file TagCompound.cs.
References Terraria.ModLoader.IO.TagIO.Deserialize().
19 dict.TryGetValue(key, out tag);
21 return TagIO.Deserialize<T>(tag);
25 $
"NBT Deserialization (type={typeof(T)}," +
26 $
"entry={TagPrinter.Print(new KeyValuePair<string, object>(key, tag))})", e);
Dictionary< string, object > dict
double Terraria.ModLoader.IO.TagCompound.GetAsDouble |
( |
string |
key | ) |
|
Definition at line 94 of file TagCompound.cs.
95 var o = Get<object>(key);
96 return o as
double? ?? o as
float? ?? 0;
int Terraria.ModLoader.IO.TagCompound.GetAsInt |
( |
string |
key | ) |
|
Definition at line 84 of file TagCompound.cs.
85 var o = Get<object>(key);
86 return o as
int? ?? o as
short? ?? o as byte? ?? 0;
long Terraria.ModLoader.IO.TagCompound.GetAsLong |
( |
string |
key | ) |
|
Definition at line 89 of file TagCompound.cs.
90 var o = Get<object>(key);
91 return o as
long? ?? o as
int? ?? o as
short? ?? o as byte? ?? 0;
short Terraria.ModLoader.IO.TagCompound.GetAsShort |
( |
string |
key | ) |
|
Definition at line 79 of file TagCompound.cs.
80 var o = Get<object>(key);
81 return o as
short? ?? o as byte? ?? 0;
bool Terraria.ModLoader.IO.TagCompound.GetBool |
( |
string |
key | ) |
|
byte Terraria.ModLoader.IO.TagCompound.GetByte |
( |
string |
key | ) |
|
byte [] Terraria.ModLoader.IO.TagCompound.GetByteArray |
( |
string |
key | ) |
|
TagCompound Terraria.ModLoader.IO.TagCompound.GetCompound |
( |
string |
key | ) |
|
double Terraria.ModLoader.IO.TagCompound.GetDouble |
( |
string |
key | ) |
|
IEnumerator<KeyValuePair<string, object> > Terraria.ModLoader.IO.TagCompound.GetEnumerator |
( |
| ) |
|
IEnumerator IEnumerable. Terraria.ModLoader.IO.TagCompound.GetEnumerator |
( |
| ) |
|
|
private |
float Terraria.ModLoader.IO.TagCompound.GetFloat |
( |
string |
key | ) |
|
int Terraria.ModLoader.IO.TagCompound.GetInt |
( |
string |
key | ) |
|
int [] Terraria.ModLoader.IO.TagCompound.GetIntArray |
( |
string |
key | ) |
|
IList<T> Terraria.ModLoader.IO.TagCompound.GetList< T > |
( |
string |
key | ) |
|
long Terraria.ModLoader.IO.TagCompound.GetLong |
( |
string |
key | ) |
|
short Terraria.ModLoader.IO.TagCompound.GetShort |
( |
string |
key | ) |
|
string Terraria.ModLoader.IO.TagCompound.GetString |
( |
string |
key | ) |
|
T Terraria.ModLoader.IO.TagCompound.GetTag< T > |
( |
string |
key | ) |
|
bool Terraria.ModLoader.IO.TagCompound.HasTag |
( |
string |
key | ) |
|
bool Terraria.ModLoader.IO.TagCompound.Remove |
( |
string |
key | ) |
|
bool Terraria.ModLoader.IO.TagCompound.RemoveTag |
( |
string |
key | ) |
|
void Terraria.ModLoader.IO.TagCompound.Set |
( |
string |
key, |
|
|
object |
value |
|
) |
| |
void Terraria.ModLoader.IO.TagCompound.Set |
( |
string |
key, |
|
|
object |
value, |
|
|
bool |
replace = false |
|
) |
| |
Definition at line 34 of file TagCompound.cs.
References Terraria.ModLoader.IO.TagIO.Serialize().
42 serialized = TagIO.Serialize(value);
45 var valueInfo =
"value=" + value;
46 if (value.GetType().ToString() != value.ToString())
47 valueInfo =
"type=" + value.GetType() +
"," + valueInfo;
48 throw new IOException($
"NBT Serialization (key={key},{valueInfo})", e);
51 dict[key] = serialized;
53 dict.Add(key, serialized);
Dictionary< string, object > dict
void Terraria.ModLoader.IO.TagCompound.SetTag |
( |
string |
key, |
|
|
object |
value |
|
) |
| |
override string Terraria.ModLoader.IO.TagCompound.ToString |
( |
| ) |
|
int Terraria.ModLoader.IO.TagCompound.Count => dict.Count |
Dictionary<string, object> Terraria.ModLoader.IO.TagCompound.dict = new Dictionary<string, object>() |
|
private |
object Terraria.ModLoader.IO.TagCompound.this[string key] |
|
getset |