示例#1
0
        /// <summary>
        /// Creates a SET operation for the specified node.
        /// </summary>
        /// <param name="node">The node.</param>
        /// <returns>An operation pair for the specified operation and node.
        /// </returns>
        private OperationPair CreateSetBidOperation(ProductPartitionNode node)
        {
            // TODO(user): This check is dangerous, since we should only depend on parent-child
            // relationships, not ID relationships.
            PreconditionUtilities.CheckArgument(node.ProductPartitionId >= NEW_ROOT_ID,
                                                string.Format(ShoppingMessages.NodeForSetCannotHaveNegativeId, node));
            AdGroupCriterionOperation setOp = new AdGroupCriterionOperation();

            setOp.@operator = Operator.SET;
            setOp.operand   = ProductPartitionNodeAdapter.CreateCriterionForSetBid(node, adGroupId);

            return(new OperationPair(node, setOp));
        }