| Visual Basic (Usage) |  Copy Code | 
|---|---|
| Dim instance As ServiceMessageContextMessageInspector Dim request As Message Dim channel As IClientChannel Dim value As Object value = instance.BeforeSendRequest(request, channel) | |
| C# | |
|---|---|
| public object BeforeSendRequest( ref Message request, IClientChannel channel ) | |
Parameters
- request
- The message to be sent to the service.
- channel
- The WCF client object channel.
Return Value
The object that is returned as the %correlationState %argument of the System.ServiceModel.Dispatcher.IClientMessageInspector.AfterReceiveReply(System.ServiceModel.Channels.Message@,System.Object) method. This is null if no correlation state is used.The best practice is to make this a System.Guid to ensure that no two correlationState objects are the same.Target Platforms: Windows 7/8/10, Windows Server 2003/2008/2012/2015, .NET4.x
 
     
     
     
     
    
    