32 instantiations of ActionModel
ApplicationModelWebSite (1)
Conventions\CloneActionConvention.cs (1)
19var actionCopy = new ActionModel(action)
Microsoft.AspNetCore.Mvc.Core (2)
ApplicationModels\ControllerModel.cs (1)
64Actions = new List<ActionModel>(other.Actions.Select(a => new ActionModel(a) { Controller = this }));
ApplicationModels\DefaultApplicationModelProvider.cs (1)
269var actionModel = new ActionModel(methodInfo, attributes);
Microsoft.AspNetCore.Mvc.Core.Test (28)
ApplicationModels\ActionModelTest.cs (4)
19var action = new ActionModel(typeof(TestController).GetMethod(nameof(TestController.Edit)), 38var action2 = new ActionModel(action); 60var action = new ActionModel( 82var action2 = new ActionModel(action);
ApplicationModels\ApiBehaviorApplicationModelProviderTest.cs (3)
24var actionModel = new ActionModel(method, Array.Empty<object>()) 51var actionModel = new ActionModel(method, Array.Empty<object>()) 94var actionModel = new ActionModel(method, Array.Empty<object>())
ApplicationModels\ApiConventionApplicationModelConventionTest.cs (2)
67var action = new ActionModel(typeof(object).GetMethods()[0], Array.Empty<object>()) 170var actionModel = new ActionModel(typeof(TestController).GetMethod(actionName), actionAttributes)
ApplicationModels\ApiVisibilityConventionTest.cs (1)
56return new ActionModel(typeof(object).GetMethods()[0], new object[0])
ApplicationModels\ClientErrorResultFilterConventionTest.cs (1)
31var action = new ActionModel(typeof(object).GetMethods()[0], new object[0]);
ApplicationModels\ControllerActionDescriptorBuilderTest.cs (4)
40var actionModel = new ActionModel(methodInfo, new List<object>() { }); 72var actionModel = new ActionModel(methodInfo, new List<object>() { }); 98var actionModel = new ActionModel(methodInfo, new List<object>() { }); 124var actionModel = new ActionModel(methodInfo, new List<object>() { });
ApplicationModels\ControllerActionDescriptorProviderTests.cs (1)
1161var actionModel = new ActionModel(methodInfo, new List<object>() { actionConvention.Object });
ApplicationModels\ControllerModelTest.cs (1)
20var action = new ActionModel(typeof(TestController).GetMethod("Edit"),
ApplicationModels\InvalidModelStateFilterConventionTest.cs (1)
26var action = new ActionModel(typeof(object).GetMethods()[0], new object[0]);
ApplicationModels\ParameterModelTest.cs (1)
18parameter.Action = new ActionModel(typeof(TestController).GetMethod("Edit"), new List<object>());
ApplicationModels\RouteTokenTransformerConventionTest.cs (2)
18var model = new ActionModel(GetMethodInfo(), Array.Empty<object>()); 38var model = new ActionModel(GetMethodInfo(), Array.Empty<object>());
DependencyInjection\ApplicationModelConventionExtensionsTest.cs (7)
21var actionModel = new ActionModel(controllerType.GetMethod(nameof(HelloController.GetInfo)), Array.Empty<object>()); 51new ActionModel(actionMethod1, Array.Empty<object>()), 61new ActionModel(actionMethod2, Array.Empty<object>()), 103new ActionModel(actionMethod1, Array.Empty<object>()) 236new ActionModel(controllerType.GetMethod(nameof(HelloController.GetHello)), Array.Empty<object>()) 310var actionModel = new ActionModel(controllerType.GetMethod(nameof(HelloController.GetInfo)), Array.Empty<object>()) 343var actionModel = new ActionModel(controllerType.GetMethod(nameof(HelloController.GetInfo)), Array.Empty<object>())
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (1)
Filters\AntiforgeryApplicationModelProviderTest.cs (1)
165var actionModel = new ActionModel(typeof(TestController).GetMethod(actionName), actionAttributes)
203 references to ActionModel
ApiExplorerWebSite (2)
ApiExplorerInboundOutboundConvention.cs (1)
28foreach (var action in controller.Actions)
ApiExplorerRouteChangeConvention.cs (1)
17public void Apply(ActionModel action)
ApplicationModelWebSite (9)
Controllers\ActionModelController.cs (1)
34public void Apply(ActionModel model)
Controllers\HomeController.cs (2)
42public void Apply(ActionModel model) 51public void Apply(ActionModel model)
Conventions\ActionDescriptionAttribute.cs (1)
17public void Apply(ActionModel model)
Conventions\CloneActionConvention.cs (4)
12var actionModels = new List<ActionModel>(); 13foreach (var action in controller.Actions) 19var actionCopy = new ActionModel(action) 28foreach (var model in actionModels)
Conventions\FromHeaderConvention.cs (1)
11public void Apply(ActionModel action)
Microsoft.AspNetCore.Mvc.Core (79)
ApplicationModels\ActionAttributeRouteModel.cs (2)
12public static IEnumerable<SelectorModel> FlattenSelectors(ActionModel actionModel) 143public static IEnumerable<(AttributeRouteModel? route, SelectorModel actionSelector, SelectorModel? controllerSelector)> GetAttributeRoutes(ActionModel actionModel)
ApplicationModels\ActionModel.cs (6)
21/// Initializes a new instance of <see cref="ActionModel"/>. 44/// Copy constructor for <see cref="ActionModel"/>. 46/// <param name="other">The <see cref="ActionModel"/> to copy.</param> 47public ActionModel(ActionModel other) 84/// <see cref="ActionModel.ApiExplorer"/> allows configuration of settings for ApiExplorer 87/// Settings applied by <see cref="ActionModel.ApiExplorer"/> override settings from
ApplicationModels\ApiBehaviorApplicationModelProvider.cs (2)
78foreach (var action in controller.Actions) 91private static void EnsureActionIsAttributeRouted(ActionModel actionModel)
ApplicationModels\ApiConventionApplicationModelConvention.cs (5)
37public void Apply(ActionModel action) 53/// <param name="action">The <see cref="ActionModel"/>.</param> 58protected virtual bool ShouldApply(ActionModel action) => true; 60private static void DiscoverApiConvention(ActionModel action) 76private void DiscoverErrorResponseType(ActionModel action)
ApplicationModels\ApiVisibilityConvention.cs (3)
12public void Apply(ActionModel action) 29/// <param name="action">The <see cref="ActionModel"/>.</param> 34protected virtual bool ShouldApply(ActionModel action) => true;
ApplicationModels\ApplicationModel.cs (1)
32/// <see cref="ControllerModel.ApiExplorer"/> or <see cref="ActionModel.ApiExplorer"/>.
ApplicationModels\ApplicationModelConventions.cs (1)
49foreach (var action in actions)
ApplicationModels\ApplicationModelFactory.cs (14)
56Func<ApplicationModel, ControllerModel, ActionModel, SelectorModel, TResult> flattener) 60var actionsByMethod = new Dictionary<MethodInfo, List<(ActionModel, SelectorModel)>>(); 61var actionsByRouteName = new Dictionary<string, List<(ActionModel, SelectorModel)>>(StringComparer.OrdinalIgnoreCase); 67foreach (var action in controller.Actions) 120ActionModel action, 174Dictionary<MethodInfo, List<(ActionModel, SelectorModel)>> actionsByMethod, 175ActionModel action, 180actions = new List<(ActionModel, SelectorModel)>(); 188Dictionary<string, List<(ActionModel action, SelectorModel selector)>> actionsByRouteName, 189ActionModel action, 200actions = new List<(ActionModel, SelectorModel)>(); 219Dictionary<string, List<(ActionModel action, SelectorModel selector)>> actionsByRouteName) 257List<(ActionModel action, SelectorModel selector)> actions, 292List<(ActionModel action, SelectorModel selector)> actions)
ApplicationModels\AuthorizationApplicationModelProvider.cs (1)
54foreach (var actionModel in controllerModel.Actions)
ApplicationModels\ClientErrorResultFilterConvention.cs (4)
11/// to <see cref="ActionModel"/> that transforms <see cref="IClientErrorActionResult"/>. 18public void Apply(ActionModel action) 33/// <param name="action">The <see cref="ActionModel"/>.</param> 38protected virtual bool ShouldApply(ActionModel action) => true;
ApplicationModels\ConsumesConstraintForFormFileParameterConvention.cs (4)
17public void Apply(ActionModel action) 32/// <param name="action">The <see cref="ActionModel"/>.</param> 37protected virtual bool ShouldApply(ActionModel action) => true; 40internal static void AddMultipartFormDataConsumesAttribute(ActionModel action)
ApplicationModels\ControllerActionDescriptorBuilder.cs (5)
29ActionModel action, 62private static void AddParameterDescriptors(ActionDescriptor actionDescriptor, ActionModel action) 104ActionModel action) 147ActionModel action, 215ActionModel action)
ApplicationModels\ControllerModel.cs (5)
33Actions = new List<ActionModel>(); 64Actions = new List<ActionModel>(other.Actions.Select(a => new ActionModel(a) { Controller = this })); 74public IList<ActionModel> Actions { get; } 81/// which apply to all actions in the controller unless overridden by <see cref="ActionModel.ApiExplorer"/>. 128/// <see cref="ActionModel.RouteValues"/>.
ApplicationModels\DefaultApplicationModelProvider.cs (5)
75var actionModel = CreateActionModel(controllerType, methodInfo); 247/// Creates the <see cref="ActionModel"/> instance for the given action <see cref="MethodInfo"/>. 252/// An <see cref="ActionModel"/> instance for the given action <see cref="MethodInfo"/> or 255internal ActionModel? CreateActionModel( 269var actionModel = new ActionModel(methodInfo, attributes);
ApplicationModels\IActionModelConvention.cs (4)
7/// Allows customization of the <see cref="ActionModel"/>. 20/// Called to apply the convention to the <see cref="ActionModel"/>. 22/// <param name="action">The <see cref="ActionModel"/>.</param> 23void Apply(ActionModel action);
ApplicationModels\InferParameterBindingInfoConvention.cs (6)
61protected virtual bool ShouldApply(ActionModel action) => true; 64/// Called to apply the convention to the <see cref="ActionModel"/>. 66/// <param name="action">The <see cref="ActionModel"/>.</param> 67public void Apply(ActionModel action) 79internal void InferParameterBindingSources(ActionModel action) 153private static bool ParameterExistsInAnyRoute(ActionModel action, string parameterName)
ApplicationModels\InvalidModelStateFilterConvention.cs (3)
11/// to <see cref="ActionModel"/> that responds to invalid <see cref="ActionContext.ModelState"/> 18public void Apply(ActionModel action) 35protected virtual bool ShouldApply(ActionModel action) => true;
ApplicationModels\ParameterModel.cs (2)
43/// The <see cref="ActionModel"/>. 45public ActionModel Action { get; set; } = default!;
ApplicationModels\RouteTokenTransformerConvention.cs (4)
10/// to use the specified <see cref="IOutboundParameterTransformer"/> on <see cref="ActionModel"/>. 29public void Apply(ActionModel action) 40/// <param name="action">The <see cref="ActionModel"/>.</param> 42protected virtual bool ShouldApply(ActionModel action) => true;
DependencyInjection\ApplicationModelConventionExtensions.cs (2)
135foreach (var action in actions) 193foreach (var action in actions)
Microsoft.AspNetCore.Mvc.Core.Test (93)
ApplicationModels\ActionModelTest.cs (6)
19var action = new ActionModel(typeof(TestController).GetMethod(nameof(TestController.Edit)), 38var action2 = new ActionModel(action); 60var action = new ActionModel( 82var action2 = new ActionModel(action); 85foreach (var property in typeof(ActionModel).GetProperties()) 128else if (property.Name.Equals(nameof(ActionModel.DisplayName)))
ApplicationModels\ApiBehaviorApplicationModelProviderTest.cs (3)
24var actionModel = new ActionModel(method, Array.Empty<object>()) 51var actionModel = new ActionModel(method, Array.Empty<object>()) 94var actionModel = new ActionModel(method, Array.Empty<object>())
ApplicationModels\ApiConventionApplicationModelConventionTest.cs (11)
20var actionModel = GetActionModel(nameof(TestController.NoMatch)); 34var actionModel = GetActionModel(nameof(TestController.Delete)); 49var actionModel = GetActionModel(nameof(TestController.Delete)); 67var action = new ActionModel(typeof(object).GetMethods()[0], Array.Empty<object>()) 86var action = GetActionModel(nameof(TestController.Delete)); 102var action = GetActionModel( 120var action = GetActionModel( 139var action = GetActionModel(nameof(TestController.Delete), new[] { new ProducesErrorResponseTypeAttribute(expected) }); 156private static TValue GetProperty<TValue>(ActionModel action) 161private static ActionModel GetActionModel( 170var actionModel = new ActionModel(typeof(TestController).GetMethod(actionName), actionAttributes)
ApplicationModels\ApiVisibilityConventionTest.cs (4)
14var action = GetActionModel(); 28var action = GetActionModel(); 43var action = GetActionModel(); 54private static ActionModel GetActionModel()
ApplicationModels\AuthorizationApplicationModelProviderTest.cs (7)
90var action = Assert.Single(controller.Actions); 117var action = Assert.Single(controller.Actions); 138var action = GetBaseControllerActionModel(provider); 165var action = GetBaseControllerActionModel(provider); 189var action = Assert.Single(controller.Actions); 193private ActionModel GetBaseControllerActionModel(AuthorizationApplicationModelProvider authorizationApplicationModelProvider) 201var action = Assert.Single(controller.Actions);
ApplicationModels\ClientErrorResultFilterConventionTest.cs (3)
14var action = GetActionModel(); 29private static ActionModel GetActionModel() 31var action = new ActionModel(typeof(object).GetMethods()[0], new object[0]);
ApplicationModels\ConsumesConstraintForFormFileParameterConventionTest.cs (3)
18var action = GetActionModel(typeof(TestController), actionName); 35var action = GetActionModel(typeof(TestController), actionName); 69private static ActionModel GetActionModel(Type controllerType, string actionName)
ApplicationModels\ControllerActionDescriptorBuilderTest.cs (4)
40var actionModel = new ActionModel(methodInfo, new List<object>() { }); 72var actionModel = new ActionModel(methodInfo, new List<object>() { }); 98var actionModel = new ActionModel(methodInfo, new List<object>() { }); 124var actionModel = new ActionModel(methodInfo, new List<object>() { });
ApplicationModels\ControllerActionDescriptorProviderTests.cs (3)
1142.Setup(c => c.Apply(It.IsAny<ActionModel>())) 1161var actionModel = new ActionModel(methodInfo, new List<object>() { actionConvention.Object }); 1952public void Apply(ActionModel action)
ApplicationModels\ControllerModelTest.cs (1)
20var action = new ActionModel(typeof(TestController).GetMethod("Edit"),
ApplicationModels\DefaultApplicationModelProviderTest.cs (8)
180var action = Assert.Single(controllerModel.Actions, a => a.ActionMethod.Name == nameof(ModelBinderController.PostAction)); 224var action = Assert.Single(controllerModel.Actions, a => a.ActionMethod.Name == nameof(ModelBinderController.FormFilesSequences)); 272var action = Assert.Single(controllerModel.Actions, a => a.ActionName == nameof(ModelBinderController.PostAction1)); 300var action = Assert.Single(controllerModel.Actions, a => a.ActionName == nameof(ModelBinderController.PostAction2)); 326var action = Assert.Single(controllerModel.Actions, a => a.ActionMethod == methodInfo); 346var action = Assert.Single(controllerModel.Actions, a => a.ActionMethod == methodInfo); 366var action = Assert.Single(controllerModel.Actions, a => a.ActionMethod == methodInfo); 1275var action = Assert.Single(model.Actions);
ApplicationModels\InferParameterBindingInfoConventionTest.cs (28)
23var action = GetActionModel(typeof(ParameterWithBindingInfo), actionName); 41var action = GetActionModel(typeof(ParameterBindingController), actionName); 64var action = GetActionModel(typeof(MultipleFromBodyController), actionName); 83var action = GetActionModel(typeof(MultipleFromBodyController), actionName); 102var action = GetActionModel(typeof(MultipleFromBodyController), actionName); 116var action = GetActionModel(typeof(ParameterBindingController), actionName, modelMetadataProvider); 150var action = GetActionModel(typeof(ParameterBindingController), actionName, modelMetadataProvider); 176var action = GetActionModel(typeof(ParameterBindingController), actionName, modelMetadataProvider); 202var action = GetActionModel(typeof(ParameterBindingController), actionName, modelMetadataProvider); 228var action = GetActionModel(typeof(ModelBinderOnParameterController), actionName, modelMetadataProvider); 249var action = GetActionModel(typeof(ModelBinderOnParameterController), actionName, modelMetadataProvider); 270var action = GetActionModel(typeof(ModelBinderOnParameterController), actionName, modelMetadataProvider); 519var actionModel = Assert.Single(controllerModel.Actions, m => m.ActionName == actionName); 652var action = GetActionModel(typeof(ParameterBindingController), actionName, modelMetadataProvider); 673var action = GetActionModel(typeof(ParameterBindingController), actionName, modelMetadataProvider); 694var action = GetActionModel(typeof(ParameterBindingController), actionName, modelMetadataProvider); 714var action = GetActionModel(typeof(ParameterBindingController), actionName, modelMetadataProvider); 735var action = GetActionModel(typeof(ParameterBindingController), actionName, modelMetadataProvider); 756var action = GetActionModel(typeof(ParameterBindingController), actionName, modelMetadataProvider); 777var action = GetActionModel(typeof(ParameterBindingController), actionName, modelMetadataProvider); 798var action = GetActionModel(typeof(ParameterBindingController), actionName, modelMetadataProvider); 819var action = GetActionModel(typeof(ParameterBindingController), actionName, modelMetadataProvider); 840var action = GetActionModel(typeof(ParameterBindingController), actionName, modelMetadataProvider); 860var action = GetActionModel(typeof(ParameterBindingController), actionName, modelMetadataProvider); 882var action = GetActionModel(typeof(ParameterBindingController), actionName, modelMetadataProvider); 921private static ActionModel GetActionModel( 933var action = GetActionModel(controllerType, actionName); 937private static ParameterModel GetParameterModel<T>(ActionModel action)
ApplicationModels\InvalidModelStateFilterConventionTest.cs (3)
14var action = GetActionModel(); 24private static ActionModel GetActionModel() 26var action = new ActionModel(typeof(object).GetMethods()[0], new object[0]);
ApplicationModels\ParameterModelTest.cs (1)
64else if (property.Name.Equals(nameof(ActionModel.DisplayName)))
ApplicationModels\RouteTokenTransformerConventionTest.cs (3)
18var model = new ActionModel(GetMethodInfo(), Array.Empty<object>()); 38var model = new ActionModel(GetMethodInfo(), Array.Empty<object>()); 70protected override bool ShouldApply(ActionModel action)
DependencyInjection\ApplicationModelConventionExtensionsTest.cs (5)
21var actionModel = new ActionModel(controllerType.GetMethod(nameof(HelloController.GetInfo)), Array.Empty<object>()); 310var actionModel = new ActionModel(controllerType.GetMethod(nameof(HelloController.GetInfo)), Array.Empty<object>()) 343var actionModel = new ActionModel(controllerType.GetMethod(nameof(HelloController.GetInfo)), Array.Empty<object>()) 432public void Apply(ActionModel action) 472public void Apply(ActionModel action)
Microsoft.AspNetCore.Mvc.Cors (2)
CorsApplicationModelProvider.cs (2)
61foreach (var actionModel in controllerModel.Actions) 85private static void ConfigureCorsActionConstraint(ActionModel actionModel)
Microsoft.AspNetCore.Mvc.Cors.Test (10)
CorsApplicationModelProviderTest.cs (10)
35var action = Assert.Single(model.Actions); 54var action = Assert.Single(model.Actions); 72var action = Assert.Single(controller.Actions); 90var action = Assert.Single(controller.Actions); 109var action = Assert.Single(controller.Actions); 128var action = Assert.Single(controller.Actions); 149var action = Assert.Single(model.Actions); 168var action = Assert.Single(model.Actions); 187var action = Assert.Single(model.Actions); 205var action = Assert.Single(model.Actions);
Microsoft.AspNetCore.Mvc.IntegrationTests (4)
AuthorizeFilterIntegrationTest.cs (4)
36var action = Assert.Single(controller.Actions); 64var action = Assert.Single(controller.Actions); 95var action = Assert.Single(controller.Actions); 131var action = Assert.Single(controller.Actions);
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
Filters\AntiforgeryApplicationModelProvider.cs (1)
37foreach (var actionModel in controllerModel.Actions)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (2)
Filters\AntiforgeryApplicationModelProviderTest.cs (2)
156private static ActionModel GetActionModel( 165var actionModel = new ActionModel(typeof(TestController).GetMethod(actionName), actionAttributes)
Mvc.RoutingWebSite (1)
ControllerRouteTokenTransformerConvention.cs (1)
20protected override bool ShouldApply(ActionModel action)