コード例 #1
0
        public object DeepClone()
        {
            var clone = (ContentXmlEntity <TContent>)MemberwiseClone();

            //Automatically deep clone ref properties that are IDeepCloneable
            DeepCloneHelper.DeepCloneRefProperties(this, clone);
            return(clone);
        }
コード例 #2
0
        public object DeepClone()
        {
            //Memberwise clone on MacroProperty will work since it doesn't have any deep elements
            // for any sub class this will work for standard properties as well that aren't complex object's themselves.
            var clone = (MacroProperty)MemberwiseClone();

            //Automatically deep clone ref properties that are IDeepCloneable
            DeepCloneHelper.DeepCloneRefProperties(this, clone);
            clone.ResetDirtyProperties(false);
            return(clone);
        }