SocketTools .NET Edition

NewsFeed.Refresh Method 

Refresh the current news feed, reloading the news channel items.

[Visual Basic]
Public Function Refresh() As Boolean
[C#]
public bool Refresh();

Return Value

A boolean value that specifies if the news feed was refreshed. A return value of true indicates success, while a return value of false indicates failure. If the method fails, the value of the LastError property can be used to determine cause of the failure.

Remarks

When the Refresh method is called, the news feed is reloaded from the original source and the items in the channel are updated. For news feeds that are frequently updated, the TimeToLive property can provide a hint to the application as to how frequently the feed should be refreshed.

If the news feed was originally opened using an http or https URL, this function will download the updated feed from the remote host and store it temporarily on the local system. Accessing a remote feed requires that the application has permission to establish a connection with the remote host and will cause the application to block until the feed has been downloaded, the operation times out or an error occurs. The same timeout period and options will be used as when the feed was originally opened.

The Refresh method should only be used if the feed was opened using the Open method, otherwise the method will fail with an error indicating that the operation is not supported.

It is important that the application does not make any assumptions about the number of news items in the channel, or the content associated with those items after the Refresh method has been called. For example, never assume that the number of items in the news feed remains the same, or that the item IDs for each item remains the same. If you need to find a specific item in the news feed, use the FindItem method.

See Also