22 writes to DisplayName
Microsoft.AspNetCore.Mvc.Core (1)
ModelBinding\Metadata\SystemTextJsonValidationMetadataProvider.cs (1)
47context.DisplayMetadata.DisplayName = () => propertyName;
Microsoft.AspNetCore.Mvc.DataAnnotations (4)
DataAnnotationsMetadataProvider.cs (4)
132displayMetadata.DisplayName = () => localizer[displayAttribute.Name]; 136displayMetadata.DisplayName = displayAttribute.GetName; 144displayMetadata.DisplayName = () => localizer[displayNameAttribute.DisplayName]; 148displayMetadata.DisplayName = () => displayNameAttribute.DisplayName;
Microsoft.AspNetCore.Mvc.NewtonsoftJson (1)
NewtonsoftJsonValidationMetadataProvider.cs (1)
46context.DisplayMetadata.DisplayName = () => propertyName;
Microsoft.AspNetCore.Mvc.TagHelpers.Test (1)
LabelTagHelperTest.cs (1)
287.DisplayDetails(metadata => metadata.DisplayName = () => displayName);
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (15)
DefaultEditorTemplatesTest.cs (1)
227.DisplayDetails(dd => dd.DisplayName = () => string.Empty);
RemoteAttributeBaseTest.cs (2)
351.DisplayDetails(d => d.DisplayName = () => "Display Length"); 391.DisplayDetails(d => d.DisplayName = () => "Display Length");
Rendering\HtmlHelperDisplayNameExtensionsTest.cs (2)
96.DisplayDetails(dd => dd.DisplayName = () => displayName); 123.DisplayDetails(dd => dd.DisplayName = () => displayName);
Rendering\HtmlHelperLabelExtensionsTest.cs (10)
157.DisplayDetails(dd => dd.DisplayName = () => string.Empty); 185.DisplayDetails(dd => dd.DisplayName = () => string.Empty); 211.DisplayDetails(dd => dd.DisplayName = () => string.Empty); 237.DisplayDetails(dd => dd.DisplayName = () => string.Empty); 263.DisplayDetails(dd => dd.DisplayName = () => displayName); 289.DisplayDetails(dd => dd.DisplayName = () => string.Empty); 319.DisplayDetails(dd => dd.DisplayName = () => string.Empty); 340.DisplayDetails(dd => dd.DisplayName = () => string.Empty); 364.DisplayDetails(dd => dd.DisplayName = () => string.Empty); 388.DisplayDetails(dd => dd.DisplayName = () => displayName);
13 references to DisplayName
Microsoft.AspNetCore.Mvc.Core (2)
ModelBinding\Metadata\DefaultModelMetadata.cs (2)
203if (DisplayMetadata.DisplayName == null) 208return DisplayMetadata.DisplayName();
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (11)
DataAnnotationsMetadataProviderTest.cs (11)
36{ new DisplayAttribute() { Name = "DN" }, d => d.DisplayName(), "DN" }, 72{ new DisplayNameAttribute("DisplayNameValue"), d => d.DisplayName(), "DisplayNameValue"}, 205Assert.Equal("DisplayAttributeValue", context.DisplayMetadata.DisplayName()); 228Assert.Equal(string.Empty, context.DisplayMetadata.DisplayName()); 251Assert.Equal("DisplayNameAttributeValue", context.DisplayMetadata.DisplayName()); 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()); 601Assert.Equal("name from localizer en-US", context.DisplayMetadata.DisplayName()); 607Assert.Equal("name from localizer fr-FR", context.DisplayMetadata.DisplayName());