public ObjectTag(ENbtBinaryReader reader) : this() { Contract.Requires <ArgumentNullException>(reader != null); this.children = new Dictionary <StringTag, Tag>(); Tag readTag = null; while (!(readTag is EndTag)) { readTag = Tag.ReadFrom(reader); StringTag stringTag = readTag as StringTag; if (stringTag != null) { this.children.Add(stringTag, Tag.ReadFrom(reader)); } } }
public bool TryGetValue(StringTag key, out Tag value) { return(this.children.TryGetValue(key, out value)); }
public bool Remove(StringTag key) { return(this.children.Remove(key)); }
public bool ContainsKey(StringTag key) { return(this.children.ContainsKey(key)); }
public void Add(StringTag key, Tag value) { this.children.Add(key, value); }
public override bool Equals(Tag other) { StringTag tag = other as StringTag; return((tag != null) && this.Equals(tag)); }