Exemplo n.º 1
0
        protected override void PerformDeepClone(object clone)
        {
            base.PerformDeepClone(clone);

            var clonedEntity = (Member)clone;

            //need to manually clone this since it's not settable
            clonedEntity._contentType = (IMemberType)ContentType.DeepClone();
        }
Exemplo n.º 2
0
        public override object DeepClone()
        {
            var clone = (Content)base.DeepClone();

            //turn off change tracking
            clone.DisableChangeTracking();
            //need to manually clone this since it's not settable
            clone._contentType = (IContentType)ContentType.DeepClone();
            //this shouldn't really be needed since we're not tracking
            clone.ResetDirtyProperties(false);
            //re-enable tracking
            clone.EnableChangeTracking();

            return(clone);
        }