38 instantiations of BindRequiredAttribute
ApiExplorerWebSite (2)
Controllers\ApiExplorerParametersController.cs (1)
37
public void IsRequiredParameters([
BindRequired
] string requiredParam, string notRequiredParam, Product product)
Models\Product.cs (1)
11
[
BindRequired
]
FormatterWebSite (5)
Controllers\TopLevelValidationController.cs (5)
15
[BindProperty,
BindRequired
] public int BindRequiredProp { get; set; }
16
[BindProperty, Required,
BindRequired
] public int RequiredAndBindRequiredProp { get; set; }
23
[
BindRequired
] public int UnboundBindRequiredProp { get; set; }
32
[
BindRequired
] int bindRequiredParam,
33
[Required,
BindRequired
] int requiredAndBindRequiredParam,
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (1)
DefaultApiDescriptionProviderTest.cs (1)
2440
private void RequiredParameter([
BindRequired
, Required] string name)
Microsoft.AspNetCore.Mvc.Core.Test (14)
ModelBinding\Binders\ComplexObjectModelBinderTest.cs (2)
1247
[
BindRequired
]
1260
[
BindRequired
]
ModelBinding\Binders\ComplexTypeModelBinderTest.cs (2)
1422
[
BindRequired
]
1435
[
BindRequired
]
ModelBinding\Metadata\DefaultBindingMetadataProviderTest.cs (6)
250
new
BindRequiredAttribute
(),
365
new
BindRequiredAttribute
(),
517
new
BindRequiredAttribute
()
540
new
BindRequiredAttribute
()
881
[
BindRequired
]
887
[
BindRequired
]
ModelBinding\Metadata\ModelAttributesTest.cs (2)
383
[
BindRequired
]
410
[
BindRequired
] BaseModel mergedAttributes)
ModelBinding\Validation\DefaultModelValidatorProviderTest.cs (2)
147
var attributes = new object[] { new RequiredAttribute(), new CustomModelValidatorAttribute(), new
BindRequiredAttribute
(), };
161
var attributes = new object[] { new RequiredAttribute(), new
BindRequiredAttribute
(), };
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (1)
ModelMetadataProviderTest.cs (1)
1028
[
BindRequired
]
Microsoft.AspNetCore.Mvc.IntegrationTests (14)
ActionParametersIntegrationTest.cs (1)
951
[
BindRequired
] int bindRequiredParam,
BindPropertyIntegrationTest.cs (2)
303
[
BindRequired
] public int BindRequiredProp { get; set; }
310
[
BindRequired
]
CollectionModelBinderIntegrationTest.cs (1)
282
[
BindRequired
]
ComplexRecordIntegrationTest.cs (5)
1949
private record Order10([
BindRequired
] Person10 Customer);
2056
private record Person11(int Id, [
BindRequired
] string Name);
2224
private record Order12([
BindRequired
] string ProductName);
2372
private record Order13([
BindRequired
] List<int> OrderIds);
4107
private record RecordTypeWithBindRequiredParameters([
BindRequired
] string Name, int Age);
ComplexTypeIntegrationTestBase.cs (4)
2098
[
BindRequired
]
2216
[
BindRequired
]
2388
[
BindRequired
]
2540
[
BindRequired
]
HeaderModelBinderIntegrationTest.cs (1)
22
[
BindRequired
]
RazorPagesWebSite (1)
Pages\CustomModelTypeModel.cshtml.cs (1)
18
[
BindRequired
]
7 references to BindRequiredAttribute
Microsoft.AspNetCore.Mvc.Core (1)
ModelBinding\BindRequiredAttribute.cs (1)
17
/// Initializes a new <see cref="
BindRequiredAttribute
"/> instance.
Microsoft.AspNetCore.Mvc.Core.Test (6)
ModelBinding\Metadata\ModelAttributesTest.cs (6)
234
attribute => Assert.IsType<
BindRequiredAttribute
>(attribute),
236
Assert.IsType<
BindRequiredAttribute
>(Assert.Single(attributes.ParameterAttributes));
255
attribute => Assert.IsType<
BindRequiredAttribute
>(attribute),
258
Assert.IsType<
BindRequiredAttribute
>(Assert.Single(attributes.ParameterAttributes));
279
attribute => Assert.IsType<
BindRequiredAttribute
>(attribute),
282
Assert.IsType<
BindRequiredAttribute
>(Assert.Single(attributes.PropertyAttributes));