Open sandboxFocus

Struct CorrelationRequest

Represents a request for the ICorrelationProtocol interface. Typically, wraps an ASP.NET incoming request or an HttpClient request.

Namespace: PostSharp.Patterns.Diagnostics.Correlation
Assembly: PostSharp.Patterns.Diagnostics.dll
Syntax
public readonly struct CorrelationRequest

Constructors

Name Description
CorrelationRequest(object, ICorrelationRequestAdapter)

Initializes a new CorrelationRequest.

Properties

Name Description
Direction

Gets the request direction (In or Out.

RemoteHost

Gets the DNS name or IP address of the remote host.

RemotePort

Gets the remote port, or -1 if it's the default port.

Request

Gets the original request object wrapped by this interface, for instance an HttpRequest, HttpWeRequest or HttpRequestMessage. This property exists so that custom implementations of ICorrelationProtocol can rely on specific properties of requests that are not exposed by this interface.

Methods

Name Description
AddHeader(string, string)

Adds a request header.

RemoveHeader(string)

Removes a request header and all its values.

TryGetHeader(string, out IEnumerable<string>)

Gets a request header.