public override void CopyFrom(DxfHandledObject from, CloneContext cloneContext) { base.CopyFrom(from, cloneContext); DxfEvalGraph dxfEvalGraph = (DxfEvalGraph)from; this.LastNodeId = (DxfEvalGraph.GraphNodeId)cloneContext.Clone((IGraphCloneable)dxfEvalGraph.LastNodeId); if (dxfEvalGraph.Nodes == null) { this.Nodes = (DxfEvalGraph.GraphNode[])null; } else { this.Nodes = new DxfEvalGraph.GraphNode[dxfEvalGraph.Nodes.Length]; for (int index = 0; index < this.Nodes.Length; ++index) { this.Nodes[index] = (DxfEvalGraph.GraphNode)dxfEvalGraph.Nodes[index].Clone(cloneContext); this.Nodes[index].Expression.vmethod_2((IDxfHandledObject)this); } } if (dxfEvalGraph.Edges == null) { this.Edges = (DxfEvalGraph.GraphEdge[])null; } else { this.Edges = dxfEvalGraph.Edges; for (int index = 0; index < this.Edges.Length; ++index) { this.Edges[index] = (DxfEvalGraph.GraphEdge)dxfEvalGraph.Edges[index].Clone(cloneContext); } } }
public override IGraphCloneable Clone(CloneContext cloneContext) { DxfEvalGraph dxfEvalGraph = (DxfEvalGraph)cloneContext.GetExistingClone((IGraphCloneable)this); if (dxfEvalGraph == null) { dxfEvalGraph = new DxfEvalGraph(); cloneContext.RegisterClone((IGraphCloneable)this, (IGraphCloneable)dxfEvalGraph); dxfEvalGraph.CopyFrom((DxfHandledObject)this, cloneContext); } return((IGraphCloneable)dxfEvalGraph); }