in FMLab/ODataConsoleApplication/Program.cs [25:35]
public static void InitializeContextObject(DataServiceContext contextObject)
{
// Make sure it is not null
if (contextObject == null)
{
throw new ArgumentNullException("contextObject");
}
// Register to the send request event in order to add the request header
contextObject.SendingRequest2 += new EventHandler<SendingRequest2EventArgs>(_ODataResource_SendingRequest);
}