Esempio n. 1
0
        public BloxBlockData Copy()
        {
            BloxBlockData bloxBlockData = new BloxBlockData(null);

            bloxBlockData.blockSysType = this.blockSysType;
            bloxBlockData.blockType    = this.blockType;
            bloxBlockData.ident        = this.ident;
            bloxBlockData.active       = this.active;
            bloxBlockData._ed_viewOffs = this._ed_viewOffs;
            bloxBlockData.returnType   = this.returnType;
            bloxBlockData.returnValue  = new byte[this.returnValue.Length];
            this.returnValue.CopyTo(bloxBlockData.returnValue, 0);
            bloxBlockData.memberReflectedType = this.memberReflectedType;
            bloxBlockData.memberType          = this.memberType;
            bloxBlockData.memberName          = this.memberName;
            bloxBlockData.paramTypes          = new string[this.paramTypes.Length];
            this.paramTypes.CopyTo(bloxBlockData.paramTypes, 0);
            bloxBlockData.fields = new BlockField[this.fields.Length];
            this.fields.CopyTo(bloxBlockData.fields, 0);
            bloxBlockData.next         = this.next;
            bloxBlockData.firstChild   = this.firstChild;
            bloxBlockData.contextBlock = this.contextBlock;
            bloxBlockData.paramBlocks  = new int[this.paramBlocks.Length];
            this.paramBlocks.CopyTo(bloxBlockData.paramBlocks, 0);
            return(bloxBlockData);
        }
Esempio n. 2
0
        private void CollectBlockData(BloxBlock b, List <BloxBlock> savedBlocks, BloxEventData data)
        {
            BloxBlockData item = new BloxBlockData(b);

            savedBlocks.Add(b);
            data.blocks.Add(item);
            if (b.contextBlock != null)
            {
                this.CollectBlockData(b.contextBlock, savedBlocks, data);
            }
            if (((b.paramBlocks != null) ? b.paramBlocks.Length : 0) != 0)
            {
                for (int i = 0; i < b.paramBlocks.Length; i++)
                {
                    if (b.paramBlocks[i] != null)
                    {
                        this.CollectBlockData(b.paramBlocks[i], savedBlocks, data);
                    }
                }
            }
            if (b.firstChild != null)
            {
                for (b = b.firstChild; b != null; b = b.next)
                {
                    this.CollectBlockData(b, savedBlocks, data);
                }
            }
        }