IEndpointComparerPolicy Interface


A MatcherPolicy interface that can be implemented to sort endpoints. Implementations of IEndpointComparerPolicy must inherit from MatcherPolicy and should be registered in the dependency injection container as singleton services of type MatcherPolicy.

public interface class IEndpointComparerPolicy
public interface IEndpointComparerPolicy
type IEndpointComparerPolicy = interface
Public Interface IEndpointComparerPolicy


Candidates in a CandidateSet are sorted based on their priority. Defining a IEndpointComparerPolicy adds an additional criterion to the sorting operation used to order candidates.

As an example, the implementation of HttpMethodMatcherPolicy implements IEndpointComparerPolicy to ensure that endpoints matching specific HTTP methods are sorted with a higher priority than endpoints without a specific HTTP method requirement.



Gets an IComparer<T> that will be used to sort the endpoints.

Applies to