Share via


FeedResourceResponse Class

Definition

Represents a response to a resource request received through an implementation of IFeedResourceProvider.OnResourceRequested).

public ref class FeedResourceResponse sealed
/// [Windows.Foundation.Metadata.Activatable(Microsoft.Windows.Widgets.Feeds.Providers.IFeedResourceResponseFactory, 327680, "Microsoft.Windows.Widgets.WidgetContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.Windows.Widgets.WidgetContract, 327680)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class FeedResourceResponse final
[Windows.Foundation.Metadata.Activatable(typeof(Microsoft.Windows.Widgets.Feeds.Providers.IFeedResourceResponseFactory), 327680, "Microsoft.Windows.Widgets.WidgetContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.Windows.Widgets.WidgetContract), 327680)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class FeedResourceResponse
function FeedResourceResponse(content, reasonPhrase, statusCode)
Public NotInheritable Class FeedResourceResponse
Inheritance
Object Platform::Object IInspectable FeedResourceResponse
Attributes

Remarks

Feed providers can access the resource request through the FeedResourceRequestedArgs.Request property and set the FeedResourceRequestedArgs.Response property to a FeedResourceResponse that contains a stream to the resource and then return.

If the evaluation or the resource is not immediately available, the provider should request a deferral by calling FeedResourceRequestedArgs.GetDeferral, initiate a background task, and complete the deferral when the resource is available.

If the provider returns the OnResourceRequested) call without setting the FeedResourceRequestedArgs.Response property, a web fetch will be made. When returning without a FeedResourceResponse, the provider may modify the Headers collection which will then be used by the web fetch.

Constructors

FeedResourceResponse(IRandomAccessStreamReference, String, Int32)

Initializes a new instance of the FeedResourceResponse class.

Properties

Content

Gets the stream of content that contains the requested resource.

Headers

Gets or sets an optional dictionary of header values that may have been returned from a web request by the feed provider.

ReasonPhrase

Gets a text description of the result that is not user facing.

StatusCode

Gets the HTTP status code of the response.

Applies to