Пример #1
0
            protected override void InternalClonemembers(FileSystemItem src)
            {
                base.InternalClonemembers(src);
                FsContainer s = (FsContainer)src;

                _itemsById   = new Dictionary <Int64, FileSystemItem>();
                _itemsByName = new Dictionary <String, FileSystemItem>();

                foreach (KeyValuePair <Int64, FileSystemItem> kv in s._itemsById)
                {
                    FileSystemItem srcItem = kv.Value;
                    if (srcItem is FsLink)
                    {
                        FsLink lnk    = (FsLink)srcItem;
                        FsLink lnkNew = (FsLink)srcItem.Clone();
                        AddItem(lnkNew, false);
                        if (FileSystemItem.BelongsTo(src.Owner._currentMovingRoot, lnk.ItemTo, true))
                        {
                            src.Owner._linksToFlip.Add(lnkNew);
                        }
                    }
                    else
                    {
                        AddItem(srcItem.Clone(), false);
                    }
                }
            }