This topic has not yet been rated - Rate this topic

DataServiceContext.ReadingResponse Event

Windows Phone

March 22, 2012

Occurs before the response message from the data service is read.

Namespace:  System.Data.Services.Client
Assembly:  System.Data.Services.Client (in System.Data.Services.Client.dll)
public event EventHandler<ReadingWritingHttpMessageEventArgs> ReadingResponse

The ReadingResponse event is raised before the incoming message stream is read. This enables you to process a response message before it is read by the client library, which is required to decompress a compressed response from the data service.

The message body is accessed as a Stream object obtained from the Content property of the ReadingWritingHttpMessageEventArgs object. The client always disposes of the returned stream.

For a batched response, the ReadingResponse event is raised for the batch response and once for each response contained in the batch response.

This event is raised only when the response has content in the message body. This means that this event is not raised for responses with an HTTP response code of 204 or 100.

Windows Phone OS

Supported in: 7.1

Windows Phone

Did you find this helpful?
(1500 characters remaining)