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

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