private bool Applies(HttpMessage message, ResponseClassification responseClassification) { foreach (var classifier in _classifiers) { if (classifier.TryClassify(message, null, out var c) && c == responseClassification) { return(true); } } return(false); }
public override bool TryClassify(HttpMessage message, Exception?exception, out ResponseClassification classification) { if (_func(message) is ResponseClassification c) { classification = c; return(true); } classification = default; return(false); }
public abstract bool TryClassify(HttpMessage message, Exception?exception, out ResponseClassification classification);