// <summary> // Copies a NewEntityOp // </summary> // <param name="op"> the NewEntityOp to copy </param> // <param name="n"> node tree corresponding to the NewEntityOp </param> // <returns> a copy of the node tree </returns> public override Node Visit(NewEntityOp op, Node n) { NewEntityOp opCopy; if (op.Scoped) { opCopy = m_destCmd.CreateScopedNewEntityOp(op.Type, op.RelationshipProperties, op.EntitySet); } else { Debug.Assert(op.EntitySet == null, "op.EntitySet must be null for the constructor that hasn't been scoped yet."); opCopy = m_destCmd.CreateNewEntityOp(op.Type, op.RelationshipProperties); } return(CopyDefault(opCopy, n)); }