4 overrides of IsRequired
Microsoft.AspNetCore.Grpc.Swagger (1)
Internal\GrpcModelMetadata.cs (1)
39public override bool IsRequired { get; }
Microsoft.AspNetCore.Mvc.Abstractions.Test (1)
ModelBinding\ModelMetadataTest.cs (1)
636public override bool IsRequired
Microsoft.AspNetCore.Mvc.ApiExplorer (1)
EndpointModelMetadata.cs (1)
39public override bool IsRequired { get; }
Microsoft.AspNetCore.Mvc.Core (1)
ModelBinding\Metadata\DefaultModelMetadata.cs (1)
314public override bool IsRequired
14 references to IsRequired
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (1)
DefaultApiDescriptionProviderTest.cs (1)
1354Assert.True(parameter.ModelMetadata.IsRequired);
Microsoft.AspNetCore.Mvc.Core (7)
ModelBinding\Binders\ServicesModelBinderProvider.cs (1)
29var isRequired = context.Metadata.IsRequired ||
ModelBinding\Metadata\ValidationMetadata.cs (2)
18/// <see cref="ModelMetadata.IsRequired"/> will be computed based on the model <see cref="System.Type"/>. 19/// See <see cref="ModelMetadata.IsRequired"/>.
ModelBinding\ObjectModelValidator.cs (3)
58/// <see cref="ModelMetadata.IsRequired"/> is <see langword="true"/>, will add one or more 78/// <see cref="ModelMetadata.IsRequired"/> is <see langword="true"/>, will add one or more 103visitor.Validate(metadata, prefix, model, alwaysValidateAtTopLevel: metadata.IsRequired, container);
ModelBinding\ParameterBinder.cs (1)
200else if (metadata.IsRequired)
Microsoft.AspNetCore.Mvc.Core.Test (1)
ModelBinding\ParameterBinderTest.cs (1)
91mockModelMetadata.Setup(o => o.IsRequired).Returns(true);
Microsoft.AspNetCore.Mvc.DataAnnotations (1)
DataAnnotationsClientModelValidatorProvider.cs (1)
89if (!hasRequiredAttribute && context.ModelMetadata.IsRequired)
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (4)
ModelMetadataProviderTest.cs (4)
331metadata => metadata.IsRequired, 673Assert.True(metadata.IsRequired); 690Assert.False(metadata.IsRequired); 705Assert.True(metadata.IsRequired);