示例#1
0
        public override void DeepCopyPopulateFields(IDeepCloneObjectGraph graph, object clone)
        {
            base.DeepCopyPopulateFields(graph, clone);

            MirrorChain mirrorArraySource = (MirrorChain)clone;

            mirrorArraySource._template = _template == null ? null : (IChain)_template.DeepCopyFindOrCreate(graph);
        }
示例#2
0
        public override object DeepCopyFindOrCreate(IDeepCloneObjectGraph context)
        {
            if (context.TryGetClone(this, out object clone))
            {
                return((MirrorChain)clone);
            }

            MirrorChain chain = new MirrorChain();

            context.Add(this, chain);
            DeepCopyPopulateFields(context, chain);
            return(chain);
        }