Ejemplo n.º 1
0
        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));
                }
            }
        }
Ejemplo n.º 2
0
 public bool TryGetValue(StringTag key, out Tag value)
 {
     return(this.children.TryGetValue(key, out value));
 }
Ejemplo n.º 3
0
 public bool Remove(StringTag key)
 {
     return(this.children.Remove(key));
 }
Ejemplo n.º 4
0
 public bool ContainsKey(StringTag key)
 {
     return(this.children.ContainsKey(key));
 }
Ejemplo n.º 5
0
 public void Add(StringTag key, Tag value)
 {
     this.children.Add(key, value);
 }
Ejemplo n.º 6
0
        public override bool Equals(Tag other)
        {
            StringTag tag = other as StringTag;

            return((tag != null) && this.Equals(tag));
        }