Esempio n. 1
0
 public virtual void Add(IEnumerable <Block> blocksToAdd)
 {
     if (this.ActionManager != null)
     {
         AddBlocksAction action = ActionFactory.AddBlocks(this, blocksToAdd);
         this.ActionManager.RecordAction(action);
     }
     else
     {
         this.Children.Add(blocksToAdd);
     }
 }
Esempio n. 2
0
        public virtual void AppendBlocks(IEnumerable <Block> blocksToAppend)
        {
            if (this.Parent == null && !CanAppendBlocks)
            {
                return;
            }

            if (this.ActionManager != null)
            {
                AddBlocksAction Action = new AddBlocksAction(this.Parent, this);
                Action.PrepareBlocks(blocksToAppend);
                this.ActionManager.RecordAction(Action);
            }
            else
            {
                this.Parent.Children.Append(this, blocksToAppend);
            }
        }