// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.AspNetCore.Http; using System.Threading.Tasks; namespace Microsoft.AspNetCore.Routing.Matching { /// /// A interface that can implemented to filter endpoints /// in a . Implementations of must /// inherit from and should be registered in /// the dependency injection container as singleton services of type . /// public interface IEndpointSelectorPolicy { /// /// Applies the policy to the . /// /// /// The associated with the current request. /// /// /// The associated with the current request. /// /// The . /// /// /// Implementations of should implement this method /// and filter the set of candidates in the by setting /// to false where desired. /// /// /// To signal an error condition, set to an /// value that will produce the desired error when executed. /// /// Task ApplyAsync(HttpContext httpContext, EndpointFeature feature, CandidateSet candidates); } }