Beispiel #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="TagFileModel"/> class using the specified file name and tag group.
        /// </summary>
        /// <param name="fileName">The name of the file.</param>
        /// <param name="groupTag">The tag group.</param>
        public TagFileModel(string fileName, AbideTagGroupFile tagGroupFile = null) : base(fileName)
        {
            //Setup
            this.tagGroupFile = tagGroupFile;

            //Loop
            foreach (ITagBlock tagBlock in tagGroupFile.TagGroup)
            {
                TagBlocks.Add(new TagBlockModel()
                {
                    Owner = this, TagBlock = tagBlock
                });
            }
        }
Beispiel #2
0
        public IfpTagGroup(IfpDocument ifpDocument)
        {
            Tag = ifpDocument.Plugin.Class;

            switch (Tag)
            {
            case "sbsp":        //scenario_structure_bsp
                if (ifpDocument.Plugin.HeaderSize == 588)
                {
                    return;
                }
                break;
            }

            if (ifpDocument.Plugin.Nodes.Count > 0)
            {
                TagBlocks.Add(new IfpTagBlock(ifpDocument.Plugin));
            }
        }
Beispiel #3
0
 public IEnumerator <Block> GetEnumerator()
 {
     return(TagBlocks.GetEnumerator());
 }
Beispiel #4
0
 protected virtual void Dispose(bool disposing)
 {
     TagBlocks.ForEach(b => b.Dispose());
     TagBlocks.Clear();
 }