HttpRequestMessageExtensions.GetCorrelationId Method
Retrieves the Guid which has been assigned as the correlation ID associated with the given request. The value will be created and set the first time this method is called.
Namespace: System.Net.Http
Assembly: System.Web.Http (in System.Web.Http.dll)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function GetCorrelationId ( _
request As HttpRequestMessage _
) As Guid
'Usage
Dim request As HttpRequestMessage
Dim returnValue As Guid
returnValue = request.GetCorrelationId()
public static Guid GetCorrelationId(
this HttpRequestMessage request
)
[ExtensionAttribute]
public:
static Guid GetCorrelationId(
HttpRequestMessage^ request
)
static member GetCorrelationId :
request:HttpRequestMessage -> Guid
public static function GetCorrelationId(
request : HttpRequestMessage
) : Guid
Parameters
request
Type: HttpRequestMessageThe HTTP request.
Return Value
Type: System.Guid
The Guid object that represents the correlation ID associated with the request.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type HttpRequestMessage. When you use instance method syntax to call this method, omit the first parameter. For more information, see https://msdn.microsoft.com/en-us/library/bb384936(v=vs.108) or https://msdn.microsoft.com/en-us/library/bb383977(v=vs.108).