34 references to DisplayFormatAttribute
HtmlGenerationWebSite (1)
Models\AClass.cs (1)
11
[
DisplayFormat
(DataFormatString = "Month: {0}")]
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (27)
DataAnnotationsMetadataProviderTest.cs (10)
42
{ new
DisplayFormatAttribute
() { ConvertEmptyStringToNull = true }, d => d.ConvertEmptyStringToNull, true },
43
{ new
DisplayFormatAttribute
() { DataFormatString = "{0:G}" }, d => d.DisplayFormatString, "{0:G}" },
45
new
DisplayFormatAttribute
() { DataFormatString = "{0:G}" },
50
new
DisplayFormatAttribute
() { DataFormatString = "{0:G}", ApplyFormatInEditMode = true },
55
new
DisplayFormatAttribute
() { DataFormatString = "{0:G}", ApplyFormatInEditMode = true },
60
new
DisplayFormatAttribute
() { DataFormatString = "{0:G}", ApplyFormatInEditMode = true },
64
{ new
DisplayFormatAttribute
() { HtmlEncode = false }, d => d.HtmlEncode, false },
65
{ new
DisplayFormatAttribute
() { NullDisplayText = "(null)" }, d => d.NullDisplayText, "(null)" },
67
new
DisplayFormatAttribute
() { NullDisplayText = "(null)" },
131
var displayFormat = new
DisplayFormatAttribute
() // But these values override the values from DataType
ModelMetadataProviderTest.cs (17)
197
new
DisplayFormatAttribute
{ DataFormatString = "value" },
202
new
DisplayFormatAttribute
{ ApplyFormatInEditMode = true, DataFormatString = "value" },
206
new
DisplayFormatAttribute
{ ApplyFormatInEditMode = true, DataFormatString = "value" },
210
new
DisplayFormatAttribute
{ NullDisplayText = "value" }, metadata => metadata.NullDisplayText
274
new
DisplayFormatAttribute
{ ConvertEmptyStringToNull = false },
279
new
DisplayFormatAttribute
{ ConvertEmptyStringToNull = true },
285
new
DisplayFormatAttribute
{ DataFormatString = "value" },
290
new
DisplayFormatAttribute
{ ApplyFormatInEditMode = true, DataFormatString = "value" },
295
new
DisplayFormatAttribute
{ HtmlEncode = false },
300
new
DisplayFormatAttribute
{ HtmlEncode = true },
496
var displayFormat = new
DisplayFormatAttribute
{ HtmlEncode = true, };
513
var displayFormat = new
DisplayFormatAttribute
{ HtmlEncode = false, };
531
var displayFormat = new
DisplayFormatAttribute
{ HtmlEncode = false, };
549
var displayFormat = new
DisplayFormatAttribute
{ DataFormatString = expected, };
567
var displayFormat = new
DisplayFormatAttribute
931
DisplayFormat = new
DisplayFormatAttribute
942
DisplayFormat = new
DisplayFormatAttribute
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (1)
Rendering\HtmlHelperDisplayExtensionsTest.cs (1)
525
[
DisplayFormat
(ApplyFormatInEditMode = true, DataFormatString = "Value: {0}")]
System.ComponentModel.Annotations (3)
System\ComponentModel\DataAnnotations\DataTypeAttribute.cs (3)
32
DisplayFormat = new
DisplayFormatAttribute
();
37
DisplayFormat = new
DisplayFormatAttribute
();
42
DisplayFormat = new
DisplayFormatAttribute
();
TagHelpersWebSite (2)
Models\Employee.cs (2)
15
[
DisplayFormat
(NullDisplayText = "Not specified")]
28
[
DisplayFormat
(NullDisplayText = "Not specified")]