DataServiceContext.BuildingRequest Event

This event is fired before a request message object is built, giving the handler the opportunity to inspect, adjust and/or replace some request information before the message is built. This event should be used to modify the outgoing Url of the request or alter request headers. After the request is built, other modifications on the WebRequest object can be made in SendingRequest2.

Namespace:  System.Data.Services.Client
Assembly:  Microsoft.Data.Services.Client (in Microsoft.Data.Services.Client.dll)

Syntax

'Declaration
Public Event BuildingRequest As EventHandler(Of BuildingRequestEventArgs)
'Usage
Dim instance As DataServiceContext 
Dim handler As EventHandler(Of BuildingRequestEventArgs)

AddHandler instance.BuildingRequest, handler
public event EventHandler<BuildingRequestEventArgs> BuildingRequest
public:
 event EventHandler<BuildingRequestEventArgs^>^ BuildingRequest {
    void add (EventHandler<BuildingRequestEventArgs^>^ value);
    void remove (EventHandler<BuildingRequestEventArgs^>^ value);
}
member BuildingRequest : IEvent<EventHandler<BuildingRequestEventArgs>,
    BuildingRequestEventArgs>
JScript supports the use of events, but not the declaration of new ones.

Remarks

When calling BeginSaveChanges and not using SaveChangesOptions.Batch and SaveChangesOptions.BatchWithIndependentOperations, this event may be raised from a different thread.

See Also

Reference

DataServiceContext Class

System.Data.Services.Client Namespace