1 write to DisplayMetadata
Microsoft.AspNetCore.Mvc.Core (1)
ModelBinding\Metadata\DisplayMetadataProviderContext.cs (1)
29DisplayMetadata = new DisplayMetadata();
34 references to DisplayMetadata
Microsoft.AspNetCore.Mvc.Core (3)
ModelBinding\Metadata\DefaultModelMetadata.cs (1)
124_details.DisplayMetadata = context.DisplayMetadata;
ModelBinding\Metadata\IDisplayMetadataProvider.cs (1)
14/// Sets the values for properties of <see cref="DisplayMetadataProviderContext.DisplayMetadata"/>.
ModelBinding\Metadata\SystemTextJsonValidationMetadataProvider.cs (1)
47context.DisplayMetadata.DisplayName = () => propertyName;
Microsoft.AspNetCore.Mvc.Core.TestCommon (1)
TestModelMetadataProvider.cs (1)
215action(context.DisplayMetadata);
Microsoft.AspNetCore.Mvc.DataAnnotations (1)
DataAnnotationsMetadataProvider.cs (1)
78var displayMetadata = context.DisplayMetadata;
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (28)
DataAnnotationsMetadataProviderTest.cs (28)
100var value = accessor(context.DisplayMetadata); 121Assert.Same(displayFormat.DataFormatString, context.DisplayMetadata.DisplayFormatString); 144Assert.Same(displayFormat.DataFormatString, context.DisplayMetadata.DisplayFormatString); 205Assert.Equal("DisplayAttributeValue", context.DisplayMetadata.DisplayName()); 228Assert.Equal(string.Empty, context.DisplayMetadata.DisplayName()); 251Assert.Equal("DisplayNameAttributeValue", context.DisplayMetadata.DisplayName()); 286Assert.Collection(context.DisplayMetadata.EnumGroupedDisplayNamesAndValues, (e) => 324Assert.Equal("Name from DisplayNameAttribute", context.DisplayMetadata.DisplayName()); 359context.DisplayMetadata.DisplayName(); 391Assert.Equal("name from resources", context.DisplayMetadata.DisplayName()); 426Assert.Equal("name from resources", context.DisplayMetadata.DisplayName()); 461Assert.Equal("description from resources", context.DisplayMetadata.Description()); 490Assert.Equal("description from resources", context.DisplayMetadata.Description()); 525Assert.Equal("prompt from resources", context.DisplayMetadata.Placeholder()); 554Assert.Equal("prompt from resources", context.DisplayMetadata.Placeholder()); 601Assert.Equal("name from localizer en-US", context.DisplayMetadata.DisplayName()); 602Assert.Equal("description from localizer en-US", context.DisplayMetadata.Description()); 603Assert.Equal("prompt from localizer en-US", context.DisplayMetadata.Placeholder()); 607Assert.Equal("name from localizer fr-FR", context.DisplayMetadata.DisplayName()); 608Assert.Equal("description from localizer fr-FR", context.DisplayMetadata.Description()); 609Assert.Equal("prompt from localizer fr-FR", context.DisplayMetadata.Placeholder()); 644Assert.Equal(expectedIsEnum, context.DisplayMetadata.IsEnum); 678Assert.Equal(expectedIsFlagsEnum, context.DisplayMetadata.IsFlagsEnum); 811Assert.Equal(expectedDictionary, context.DisplayMetadata.EnumNamesAndValues); 854context.DisplayMetadata.EnumGroupedDisplayNamesAndValues, 990context.DisplayMetadata.EnumGroupedDisplayNamesAndValues, 1018context.DisplayMetadata.EnumGroupedDisplayNamesAndValues, 1692return context.DisplayMetadata.EnumGroupedDisplayNamesAndValues;
Microsoft.AspNetCore.Mvc.NewtonsoftJson (1)
NewtonsoftJsonValidationMetadataProvider.cs (1)
46context.DisplayMetadata.DisplayName = () => propertyName;