34 references to ContainerType
Microsoft.AspNetCore.Mvc.Abstractions (2)
ModelBinding\ModelMetadata.cs (2)
72/// Gets the metadata for <see cref="ContainerType"/> if this metadata is for a property; 803return $"ModelMetadata (Property: '{ContainerType!.Name}.{PropertyName}' Type: '{ModelType.Name}')";
Microsoft.AspNetCore.Mvc.Abstractions.Test (3)
ModelBinding\ModelMetadataTest.cs (3)
252Assert.Null(metadata.ContainerType); 264Assert.Null(metadata.ContainerType); 275Assert.Equal(typeof(string), metadata.ContainerType);
Microsoft.AspNetCore.Mvc.ApiExplorer (2)
DefaultApiDescriptionProvider.cs (2)
622if (modelMetadata.ContainerType != null) 696ContainerType = metadata.ContainerType!;
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (2)
EndpointMetadataApiDescriptionProviderTest.cs (2)
716Assert.NotNull(apiDescription.ParameterDescriptions[0].ModelMetadata.ContainerType); 717Assert.Equal(typeof(AsParametersWithRequiredMembers), apiDescription.ParameterDescriptions[0].ModelMetadata.ContainerType);
Microsoft.AspNetCore.Mvc.Core (12)
ModelBinding\Binders\ComplexObjectModelBinder.cs (1)
206bindingContext.ModelMetadata.ContainerType!.FullName));
ModelBinding\Binders\ComplexTypeModelBinder.cs (1)
495bindingContext.ModelMetadata.ContainerType.FullName));
ModelBinding\ModelBinderFactory.cs (1)
313return $"{_token} (Property: '{_metadata.ContainerType!.Name}.{_metadata.PropertyName}' " +
ModelBinding\ParameterBinder.Log.cs (5)
33modelMetadata.ContainerType, 79modelMetadata.ContainerType, 125modelMetadata.ContainerType, 175modelMetadata.ContainerType, 224modelMetadata.ContainerType,
ModelBinding\Validation\ValidationVisitor.cs (1)
302message = Resources.FormatValidationVisitor_ExceededMaxPropertyDepth(nameof(ValidationVisitor), MaxValidationDepth, metadata.Name, metadata.ContainerType);
MvcCoreLoggerExtensions.cs (3)
134modelMetadata.ContainerType, 188modelMetadata.ContainerType, 227modelMetadata.ContainerType,
Microsoft.AspNetCore.Mvc.Core.Test (2)
ModelBinding\Metadata\DefaultModelMetadataTest.cs (2)
92Assert.Null(metadata.ContainerType); 111Assert.Equal(typeof(Exception), metadata.ContainerType);
Microsoft.AspNetCore.Mvc.DataAnnotations (4)
CompareAttributeAdapter.cs (2)
86if (otherPropertyDisplayName == null && validationContext.ModelMetadata.ContainerType != null) 89validationContext.ModelMetadata.ContainerType,
DataAnnotationsClientModelValidatorProvider.cs (1)
54context.ModelMetadata.ContainerType ?? context.ModelMetadata.ModelType,
DataAnnotationsModelValidatorProvider.cs (1)
50context.ModelMetadata.ContainerType ?? context.ModelMetadata.ModelType,
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
ModelExplorer.cs (1)
104/// instances, then use <see cref="ModelMetadata.ContainerType"/> to validate this assumption.
RemoteAttributeBase.cs (1)
187context.ModelMetadata.ContainerType ?? context.ModelMetadata.ModelType,
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (3)
ModelExplorerTest.cs (3)
53Assert.Equal(typeof(DerivedClass), baseProperty.Metadata.ContainerType); 58Assert.Equal(typeof(DerivedClass), derivedProperty.Metadata.ContainerType); 77Assert.Equal(typeof(BaseClass), baseProperty.Metadata.ContainerType);
Microsoft.AspNetCore.OpenApi (2)
Extensions\JsonNodeSchemaExtensions.cs (1)
306if (parameterDescription.ModelMetadata is { PropertyName: { }, ContainerType: { }, HasValidators: true, ValidatorMetadata: { } validations })
Services\OpenApiDocumentService.cs (1)
519if (parameter.All(parameter => parameter.ModelMetadata.ContainerType is null))