SyndicationClient Class

Definition

Implements the ISyndicationClient interface which retrieves feeds from a URI asynchronously.

public ref class SyndicationClient sealed : ISyndicationClient
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.Activatable(Windows.Web.Syndication.ISyndicationClientFactory, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class SyndicationClient final : ISyndicationClient
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.Activatable(Windows.Web.Syndication.ISyndicationClientFactory, 65536, "Windows.Foundation.UniversalApiContract")]
class SyndicationClient final : ISyndicationClient
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Web.Syndication.ISyndicationClientFactory), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class SyndicationClient : ISyndicationClient
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Web.Syndication.ISyndicationClientFactory), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class SyndicationClient : ISyndicationClient
function SyndicationClient(serverCredential)
Public NotInheritable Class SyndicationClient
Implements ISyndicationClient
Inheritance
Object Platform::Object IInspectable SyndicationClient
Attributes
Implements

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

The following code demonstrates how to retrieve a feed using RetrieveFeedAsync.

using Windows.Foundation;
using Windows.Web.Syndication;

async Task GetFeedAsync(string feedUri)
{
    var uri = new Uri(feedUri);
    var client = new SyndicationClient(){ BypassCacheOnRetrieve = true };
    currentFeed = await client.RetrieveFeedAsync(uri);
}

For additional examples that demonstrate how this class is used to retrieve syndicated content from the web, see Quickstart: Accessing a web feed.

Constructors

SyndicationClient()

Creates a new SyndicationClient object.

SyndicationClient(PasswordCredential)

Creates a new SyndicationClient object with authentication credentials.

Properties

BypassCacheOnRetrieve

Gets or sets a Boolean value that specifies whether to bypass the cache when retrieving the feed.

MaxResponseBufferSize

Gets or sets the maximum number of bytes to buffer when receiving a response from a server.

ProxyCredential

Gets or sets the credentials to use when making requests via a proxy.

ServerCredential

Gets or sets the credentials to use when making requests to the server.

Timeout

Gets or sets the maximum amount of time, in milliseconds, to wait for any of the asynchronous operations to complete. If the operation is not complete within this amount of time, it will fail with a status code indicating that it timed out.

Methods

RetrieveFeedAsync(Uri)

Starts an asynchronous operation to download the syndication feed from the given URI. This method instantiates a SyndicationFeed object from the feed string, which can be in one of the formats specified in SyndicationFormat.

SetRequestHeader(String, String)

Sets an HTTP header for the request. This method can be called multiple times to set multiple headers. When the same header is set multiple times, the values will be concatenated and separated by ",".

Applies to

See also