Exemple #1
0
            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);
            }
Exemple #2
0
            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);
            }
Exemple #3
0
 public abstract bool TryClassify(HttpMessage message, Exception?exception, out ResponseClassification classification);