// <summary> // Copies a DistinctOp // </summary> // <param name="op"> The Op to Copy </param> // <param name="n"> The Node that references the Op </param> // <returns> A copy of the original Node that references a copy of the original Op </returns> public override Node Visit(DistinctOp op, Node n) { // Visit the Node's children and map their Vars var children = ProcessChildren(n); // Copy the DistinctOp's Keys var newDistinctKeys = Copy(op.Keys); // Create a new DistinctOp that uses the copied keys var newDistinctOp = m_destCmd.CreateDistinctOp(newDistinctKeys); // Return a new Node that references the copied DistinctOp and has the copied child Nodes as its children return(m_destCmd.CreateNode(newDistinctOp, children)); }