Class RequestHandler
Abstraction which allows defining of custom message handlers.
public abstract class RequestHandler
- Inheritance
-
RequestHandler
- Inherited Members
- Extension Methods
Remarks
Custom implementations are required to be stateless.
Constructors
RequestHandler()
The default constructor for the RequestHandler
protected RequestHandler()
Properties
InnerHandler
Defines a next handler to be called in the chain.
public RequestHandler InnerHandler { get; set; }
Property Value
Methods
SendAsync(RequestMessage, CancellationToken)
Processes the current RequestMessage in the current handler and sends the current RequestMessage to the next handler in the chain.
public virtual Task<ResponseMessage> SendAsync(RequestMessage request, CancellationToken cancellationToken)
Parameters
request
RequestMessageRequestMessage received by the handler.
cancellationToken
CancellationTokenCancellationToken received by the handler.
Returns
- Task<ResponseMessage>
An instance of ResponseMessage.