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