/// <inheritdoc />
        public void OnProvidersExecuting(EndpointConstraintProviderContext context)
        {
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }

            for (var i = 0; i < context.Results.Count; i++)
            {
                ProvideConstraint(context.Results[i], context.HttpContext.RequestServices);
            }
        }
        private void ExecuteProviders(HttpContext httpContext, Endpoint endpoint, List <EndpointConstraintItem> items)
        {
            var context = new EndpointConstraintProviderContext(httpContext, endpoint, items);

            for (var i = 0; i < _endpointConstraintProviders.Length; i++)
            {
                _endpointConstraintProviders[i].OnProvidersExecuting(context);
            }

            for (var i = _endpointConstraintProviders.Length - 1; i >= 0; i--)
            {
                _endpointConstraintProviders[i].OnProvidersExecuted(context);
            }
        }
 public void OnProvidersExecuting(EndpointConstraintProviderContext context)
 {
     foreach (var item in context.Results)
     {
         if (item.Metadata is BooleanConstraintMarker marker)
         {
             Assert.Null(item.Constraint);
             item.Constraint = new BooleanConstraint()
             {
                 Pass = marker.Pass
             };
         }
     }
 }
 public void OnProvidersExecuted(EndpointConstraintProviderContext context)
 {
 }