/// <summary>
    /// Runs the code example.
    /// </summary>
    /// <param name="user">The AdWords user.</param>
    /// <param name="campaignId">The campaign ID.</param>
    public void Run(AdWordsUser user, long campaignId) {
      // Get the VideoCampaignCriterionService.
      VideoCampaignCriterionService videoCampaignCriterionService =
          (VideoCampaignCriterionService) user.GetService(
              AdWordsService.v201402.VideoCampaignCriterionService);

      int offset = 0;

      VideoCampaignCriterionPage page = new VideoCampaignCriterionPage();

      try {
        // Create selector.
        VideoCampaignCriterionSelector selector = new VideoCampaignCriterionSelector();
        selector.campaignIds = new long[] { campaignId };

        selector.paging = new Paging();

        do {
          selector.paging.startIndex = offset;
          selector.paging.numberResults = PAGE_SIZE;

          page = videoCampaignCriterionService.get(selector);

          // Display the results.
          if (page != null && page.entries != null) {
            int i = offset;
            foreach (VideoCampaignCriterion videoCampaignCriterion in page.entries) {
              String negative =
                  (videoCampaignCriterion is NegativeVideoCampaignCriterion) ? " (negative)"
                      : "";
              Console.WriteLine("{0}) Video {1} criterion ID {2} of type '{3}'", (i + 1),
                negative,
                  videoCampaignCriterion.criterion.id,
                  videoCampaignCriterion.criterion.BaseCriterionType);
              i++;
            }
          } else {
            Console.WriteLine("No video campaign criteria were found.");
          }
          offset += PAGE_SIZE;
        } while (offset < page.totalNumEntries);
        Console.WriteLine("Number of video campaign criteria found: {0}", page.totalNumEntries);
      } catch (Exception ex) {
        throw new System.ApplicationException("Failed to get video campaign criteria.", ex);
      }
    }
 public virtual VideoCampaignCriterionPage get(VideoCampaignCriterionSelector selector) {
   object[] results = this.Invoke("get", new object[] { selector });
   return ((VideoCampaignCriterionPage) (results[0]));
 }