Ejemplo n.º 1
0
        public void QuerySitemaps()
        {
            WebmasterToolsService service = new WebmasterToolsService(this.ApplicationName);
            service.Credentials = new GDataCredentials(this.userName, this.passWord);

            SitemapsQuery feedQuery = new SitemapsQuery(SitemapsQuery.CreateCustomUri("http%3A%2F%2Fwww%2Eexample%2Ecom%2F"));
            SitemapsFeed feed = service.Query(feedQuery);

            Assert.GreaterOrEqual(feed.Entries.Count, 0);

            foreach (SitemapsEntry entry in feed.Entries)
            {
                Assert.IsNotNull(entry.Id);
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// overloaded to create typed version of Query
 /// </summary>
 /// <param name="feedQuery"></param>
 /// <returns>SitemapsFeed</returns>
 public SitemapsFeed Query(SitemapsQuery feedQuery)
 {
     return base.Query(feedQuery) as SitemapsFeed;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// overloaded to create typed version of Query
 /// </summary>
 /// <param name="feedQuery"></param>
 /// <returns>SitemapsFeed</returns>
 public SitemapsFeed Query(SitemapsQuery feedQuery)
 {
     return(base.Query(feedQuery) as SitemapsFeed);
 }