Nanook.QueenBee.Parser.QbItemStruct.Create C# (CSharp) Метод

Create() публичный Метод

public Create ( QbItemType type ) : void
type QbItemType
Результат void
        public override void Create(QbItemType type)
        {
            if (type != QbItemType.SectionStruct && type != QbItemType.StructItemStruct && type != QbItemType.StructHeader)
                throw new ApplicationException(string.Format("type '{0}' is not a struct item type", type.ToString()));

            base.Create(type);

            if (type != QbItemType.StructHeader)
            {
                _headerType = QbItemType.StructHeader;
                _headerValue = this.Root.PakFormat.GetQbItemValue(_headerType, this.Root);
            }
        }

Usage Example

Пример #1
0
        /// <summary>
        /// Deep clones this item and all children.  Positions and lengths are not cloned.  When inserted in to another item they should be calculated.
        /// </summary>
        /// <returns></returns>
        public override QbItemBase Clone()
        {
            QbItemStruct s = new QbItemStruct(this.Root);
            s.Create(this.QbItemType);

            if (this.ItemQbKey != null)
                s.ItemQbKey = this.ItemQbKey.Clone();

            foreach (QbItemBase qib in this.Items)
                s.Items.Add(qib.Clone());

            s.ItemCount = this.ItemCount;

            return s;
        }
All Usage Examples Of Nanook.QueenBee.Parser.QbItemStruct::Create