Contains information about the RSS feed.
Exemplo n.º 1
0
 /// <summary>
 /// Get the latest RSS for all the URLs in the dictionary.
 /// </summary>
 private static void Update()
 {
     foreach (string url in dictionary.Keys)
     {
         // For simplicity, so this synchronously, single-threaded and
         // without error handling.
         var response = new StreamReader(WebRequest.Create(url).GetResponse().GetResponseStream());
         dictionary[url] = new RssFeedData
         {
             LastRetrieved = DateTime.UtcNow,
             Data          = response.ReadToEnd(),
         };
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Add the specified urls to the RSS dictionary.
 /// </summary>
 /// <param name="urls">Urls to add.</param>
 private static void Add(string[] urls)
 {
     foreach (string url in urls)
     {
         // Don't overwrite an existing entry
         if (!dictionary.ContainsKey(url))
         {
             dictionary[url] = new RssFeedData
             {
                 LastRetrieved = null,
                 Data          = String.Empty,
             };
         }
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Get the latest RSS for all the URLs in the dictionary. 
 /// </summary>
 private static void Update()
 {
     foreach (string url in dictionary.Keys)
     {
         // For simplicity, so this synchronously, single-threaded and
         // without error handling.
         var response = new StreamReader(WebRequest.Create(url).GetResponse().GetResponseStream());
         dictionary[url] = new RssFeedData
         {
             LastRetrieved = DateTime.UtcNow,
             Data = response.ReadToEnd(),
         };
     }
 }
Exemplo n.º 4
0
 /// <summary>
 /// Add the specified urls to the RSS dictionary.
 /// </summary>
 /// <param name="urls">Urls to add.</param>
 private static void Add(string[] urls)
 {
     foreach (string url in urls)
     {
         // Don't overwrite an existing entry
         if (!dictionary.ContainsKey(url))
         {
             dictionary[url] = new RssFeedData
             {
                 LastRetrieved = null,
                 Data = String.Empty,
             };
         }
     }
 }