Nanook.QueenBee.Parser.QbItemArray.Create C# (CSharp) Method

Create() public method

public Create ( QbItemType type ) : void
type QbItemType
return void
        public override void Create(QbItemType type)
        {
            if (type != QbItemType.SectionArray && type != QbItemType.ArrayArray && type != QbItemType.StructItemArray && type != QbItemType.StructItemStruct)
                throw new ApplicationException(string.Format("type '{0}' is not an array item type", type.ToString()));

            base.Create(type);
        }

Usage Example

Beispiel #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()
        {
            QbItemArray a = new QbItemArray(this.Root);
            a.Create(this.QbItemType);

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

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

            a.ItemCount = this.ItemCount;

            return a;
        }
All Usage Examples Of Nanook.QueenBee.Parser.QbItemArray::Create