I have the following setup.
class A : DelegatingHandler{
protected override Task<HttpResponseMessage> SendAsync(
HttpRequestMessage request,
CancellationToken cancellationToken)
{
// some logic.
return base.SendAsync(request, cancellationToken);
}
}
class B : A{
protected override Task<HttpResponseMessage> SendAsync(
HttpRequestMessage request,
CancellationToken cancellationToken)
{
// some logic.
if(condition == true){
**// call next handler. skip A's logic. How to achieve this?**
}
else{
return base.SendAsync(request, cancellationToken);
}
}
}
How can directly call next message handler without going through A’s logic? Any help would be appreciated.