3 writes to ActionConstraints
Microsoft.AspNetCore.Mvc.Core (2)
ApplicationModels\SelectorModel.cs (2)
18
ActionConstraints
= new List<IActionConstraintMetadata>();
30
ActionConstraints
= new List<IActionConstraintMetadata>(other.ActionConstraints);
Microsoft.AspNetCore.Mvc.RazorPages.Test (1)
Infrastructure\PageActionDescriptorProviderTest.cs (1)
180
ActionConstraints
= { expected }
58 references to ActionConstraints
Microsoft.AspNetCore.Mvc.Core (13)
ApplicationModels\ActionAttributeRouteModel.cs (7)
37
for (var i = additionalSelector.
ActionConstraints
.Count - 1; i >= 0; i--)
39
if (additionalSelector.
ActionConstraints
[i] is IRouteTemplateProvider)
41
additionalSelector.
ActionConstraints
.RemoveAt(i);
73
AddActionConstraints(selector, additionalSelector?.
ActionConstraints
);
91
AddActionConstraints(selector, controllerSelector.
ActionConstraints
);
110
AddActionConstraints(selector, additionalSelector?.
ActionConstraints
);
124
selector.
ActionConstraints
.Add(actionConstraints[i]);
ApplicationModels\ApplicationModelFactory.cs (1)
303
var verbs = selector.
ActionConstraints
?.OfType<HttpMethodActionConstraint>().FirstOrDefault()?.HttpMethods;
ApplicationModels\ControllerActionDescriptorBuilder.cs (2)
183
if (selectorModel.
ActionConstraints
?.Count > 0)
185
actionDescriptor.ActionConstraints = new List<IActionConstraintMetadata>(selectorModel.
ActionConstraints
);
ApplicationModels\DefaultApplicationModelProvider.cs (2)
661
AddRange(selectorModel.
ActionConstraints
, attributes.OfType<IActionConstraintMetadata>());
673
selectorModel.
ActionConstraints
.Add(new HttpMethodActionConstraint(httpMethods));
ApplicationModels\SelectorModel.cs (1)
30
ActionConstraints = new List<IActionConstraintMetadata>(other.
ActionConstraints
);
Microsoft.AspNetCore.Mvc.Core.Test (33)
ApplicationModels\ActionModelTest.cs (1)
69
selectorModel.
ActionConstraints
.Add(new HttpMethodActionConstraint(new string[] { "GET" }));
ApplicationModels\ControllerModelTest.cs (3)
48
Assert.NotSame(controller.Selectors[0].
ActionConstraints
, controller2.Selectors[0].
ActionConstraints
);
73
selectorModel.
ActionConstraints
.Add(new HttpMethodActionConstraint(new string[] { "GET" }));
ApplicationModels\DefaultApplicationModelProviderTest.cs (29)
760
Assert.Empty(action.Selectors[0].
ActionConstraints
.OfType<HttpMethodActionConstraint>());
779
action.Selectors[0].
ActionConstraints
.OfType<HttpMethodActionConstraint>());
803
action.Selectors[0].
ActionConstraints
.OfType<HttpMethodActionConstraint>());
828
action.Selectors[0].
ActionConstraints
.OfType<HttpMethodActionConstraint>());
851
action.Selectors[0].
ActionConstraints
.OfType<HttpMethodActionConstraint>());
874
action.Selectors[0].
ActionConstraints
.OfType<HttpMethodActionConstraint>());
901
Assert.Empty(action.Selectors[0].
ActionConstraints
);
926
action.Selectors[0].
ActionConstraints
.OfType<HttpMethodActionConstraint>());
966
var methodConstraint = Assert.Single(selectorModel.
ActionConstraints
.OfType<HttpMethodActionConstraint>());
971
methodConstraint = Assert.Single(all.
ActionConstraints
.OfType<HttpMethodActionConstraint>());
993
Assert.Empty(action.Selectors[0].
ActionConstraints
);
1015
Assert.Empty(action.Selectors[0].
ActionConstraints
);
1040
var methodConstraint = Assert.Single(selectorModel.
ActionConstraints
.OfType<HttpMethodActionConstraint>());
1066
action.Selectors[0].
ActionConstraints
.OfType<HttpMethodActionConstraint>());
1088
var methodConstraint = Assert.Single(selectorModel.
ActionConstraints
.OfType<HttpMethodActionConstraint>());
1092
methodConstraint = Assert.Single(selectorModel.
ActionConstraints
.OfType<HttpMethodActionConstraint>());
1111
var methodConstraint = Assert.Single(selectorModel.
ActionConstraints
.OfType<HttpMethodActionConstraint>());
1115
methodConstraint = Assert.Single(selectorModel.
ActionConstraints
.OfType<HttpMethodActionConstraint>());
1119
methodConstraint = Assert.Single(selectorModel.
ActionConstraints
.OfType<HttpMethodActionConstraint>());
1138
var methodConstraint = Assert.Single(selectorModel.
ActionConstraints
.OfType<HttpMethodActionConstraint>());
1142
methodConstraint = Assert.Single(selectorModel.
ActionConstraints
.OfType<HttpMethodActionConstraint>());
1162
var methodConstraint = Assert.Single(selectorModel.
ActionConstraints
.OfType<HttpMethodActionConstraint>());
1166
methodConstraint = Assert.Single(selectorModel.
ActionConstraints
.OfType<HttpMethodActionConstraint>());
1190
Assert.Equal(2, selectorModel.
ActionConstraints
.Count);
1191
Assert.Single(selectorModel.
ActionConstraints
.OfType<RouteAndConstraintAttribute>());
1192
Assert.Single(selectorModel.
ActionConstraints
.OfType<ConstraintAttribute>());
1197
Assert.Equal(2, selectorModel.
ActionConstraints
.Count);
1198
Assert.Single(selectorModel.
ActionConstraints
.OfType<RouteAndConstraintAttribute>());
1199
Assert.Single(selectorModel.
ActionConstraints
.OfType<ConstraintAttribute>());
Microsoft.AspNetCore.Mvc.Cors (1)
CorsApplicationModelProvider.cs (1)
95
var actionConstraints = selectorModel.
ActionConstraints
;
Microsoft.AspNetCore.Mvc.Cors.Test (10)
CorsApplicationModelProviderTest.cs (10)
37
var constraint = Assert.Single(selector.
ActionConstraints
, c => c is HttpMethodActionConstraint);
56
var constraint = Assert.Single(selector.
ActionConstraints
, c => c is HttpMethodActionConstraint);
74
var constraint = Assert.Single(selector.
ActionConstraints
, c => c is HttpMethodActionConstraint);
93
var constraint = Assert.Single(selector.
ActionConstraints
, c => c is HttpMethodActionConstraint);
112
var constraint = Assert.Single(selector.
ActionConstraints
, c => c is HttpMethodActionConstraint);
130
var constraint = Assert.Single(selector.
ActionConstraints
, c => c is HttpMethodActionConstraint);
151
var constraint = Assert.Single(selector.
ActionConstraints
, c => c is HttpMethodActionConstraint);
170
var constraint = Assert.Single(selector.
ActionConstraints
, c => c is HttpMethodActionConstraint);
189
var constraint = Assert.Single(selector.
ActionConstraints
, c => c is HttpMethodActionConstraint);
207
var constraint = Assert.Single(selector.
ActionConstraints
, c => c is HttpMethodActionConstraint);
Microsoft.AspNetCore.Mvc.RazorPages (1)
Infrastructure\PageActionDescriptorProvider.cs (1)
92
ActionConstraints = selector.
ActionConstraints
.ToList(),