24 references to Name
Microsoft.AspNetCore.Mvc.Abstractions (4)
ModelBinding\ModelMetadata.cs (4)
673string.Equals(p.Name, parameter.ParameterName, StringComparison.Ordinal) && 688Resources.FormatRecordTypeHasValidationOnProperties(ModelType, property.Name)); 703/// non-<see langword="null"/> value: <see cref="DisplayName"/>, <see cref="Name"/>, or <c>ModelType.Name</c>. 708return DisplayName ?? Name ?? ModelType.Name;
Microsoft.AspNetCore.Mvc.Abstractions.Test (3)
ModelBinding\ModelMetadataTest.cs (3)
287Assert.Null(metadata.Name); 301Assert.Equal("item", metadata.Name); 314Assert.Equal(nameof(string.Length), metadata.Name);
Microsoft.AspNetCore.Mvc.ApiExplorer (1)
DefaultApiDescriptionProvider.cs (1)
533PropertyName = propertyName ?? metadata.Name;
Microsoft.AspNetCore.Mvc.Core (2)
ModelBinding\Binders\CollectionModelBinder.cs (1)
385bindingContext.ModelMetadata.Name :
ModelBinding\Validation\ValidationVisitor.cs (1)
302message = Resources.FormatValidationVisitor_ExceededMaxPropertyDepth(nameof(ValidationVisitor), MaxValidationDepth, metadata.Name, metadata.ContainerType);
Microsoft.AspNetCore.Mvc.Core.Test (11)
ModelBinding\Metadata\DefaultModelMetadataProviderTest.cs (8)
289metadata.Properties.OrderBy(p => p.Name), 292Assert.Equal(nameof(DerivedModelType.DerivedProperty), p.Name); 301Assert.Equal(nameof(DerivedModelType.Property1), p.Name); 311Assert.Equal(nameof(DerivedModelType.Property2), p.Name); 373metadata.Properties.OrderBy(p => p.Name), 376Assert.Equal(nameof(DerivedModelType.DerivedProperty), p.Name); 385Assert.Equal(nameof(DerivedModelType.Property1), p.Name); 395Assert.Equal(nameof(DerivedModelType.Property2), p.Name);
ModelBinding\ParameterBinderTest.cs (1)
193var expectedFieldName = metadata.Name ?? nameof(Person);
ModelBinding\Validation\ClientValidatorCacheTest.cs (1)
73var parameter = metadata.BoundConstructor.BoundConstructorParameters.First(f => f.Name == nameof(TestRecordType.Property1));
ModelBinding\Validation\DefaultComplexObjectValidationStrategyTest.cs (1)
169var metadataProvider = new ExcludePropertiesDefaultModelMetadataProvider(detailsProvider, property => property.Name == "Age");
Microsoft.AspNetCore.Mvc.DataAnnotations (3)
DataAnnotationsModelValidator.cs (1)
71var memberName = metadata.Name;
NumericClientModelValidator.cs (1)
37var name = modelMetadata.DisplayName ?? modelMetadata.Name;
ValidatableObjectAdapter.cs (1)
39MemberName = context.ModelMetadata.Name,