Beispiel #1
0
        /// <summary>
        /// Creates a new deep copy of this RAF In Memory FSO
        ///
        /// ...Only Nodes are deep copied
        /// </summary>
        /// <returns></returns>
        public override object Clone()
        {
            RAFInMemoryFileSystemObject result = new RAFInMemoryFileSystemObject(null, this.fsoType, this.Name);

            for (int i = 0; i < this.Nodes.Count; i++)
            {
                result.Nodes.Add((RAFInMemoryFileSystemObject)this.Nodes[i].Clone());
            }

            if (this.IsExpanded)
            {
                result.Expand();
            }
            return(result);
        }
        /// <summary>
        /// Creates a new deep copy of this RAF In Memory FSO
        /// 
        /// ...Only Nodes are deep copied
        /// </summary>
        /// <returns></returns>
        public override object Clone()
        {
            RAFInMemoryFileSystemObject result = new RAFInMemoryFileSystemObject(null, this.fsoType, this.Name);
            for (int i = 0; i < this.Nodes.Count; i++)
                result.Nodes.Add((RAFInMemoryFileSystemObject)this.Nodes[i].Clone());

            if (this.IsExpanded)
                result.Expand();
            return result;
        }