// 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 System; using System.Collections.Generic; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Abstractions; namespace Microsoft.AspNetCore.Mvc.ActionConstraints { /// /// Context for an action constraint provider. /// public class ActionConstraintProviderContext { /// /// Creates a new . /// /// The associated with the request. /// The for which constraints are being created. /// The list of objects. public ActionConstraintProviderContext( HttpContext context, ActionDescriptor action, IList items) { if (context == null) { throw new ArgumentNullException(nameof(context)); } if (action == null) { throw new ArgumentNullException(nameof(action)); } if (items == null) { throw new ArgumentNullException(nameof(items)); } HttpContext = context; Action = action; Results = items; } /// /// The associated with the request. /// public HttpContext HttpContext { get; } /// /// The for which constraints are being created. /// public ActionDescriptor Action { get; private set; } /// /// The list of objects. /// public IList Results { get; private set; } } }