-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
DataTypeAttribute.xml
470 lines (436 loc) · 31.6 KB
/
DataTypeAttribute.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
<Type Name="DataTypeAttribute" FullName="System.ComponentModel.DataAnnotations.DataTypeAttribute">
<TypeSignature Language="C#" Value="public class DataTypeAttribute : System.ComponentModel.DataAnnotations.ValidationAttribute" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit DataTypeAttribute extends System.ComponentModel.DataAnnotations.ValidationAttribute" />
<TypeSignature Language="DocId" Value="T:System.ComponentModel.DataAnnotations.DataTypeAttribute" />
<TypeSignature Language="VB.NET" Value="Public Class DataTypeAttribute
Inherits ValidationAttribute" />
<TypeSignature Language="F#" Value="type DataTypeAttribute = class
 inherit ValidationAttribute" />
<TypeSignature Language="C++ CLI" Value="public ref class DataTypeAttribute : System::ComponentModel::DataAnnotations::ValidationAttribute" />
<AssemblyInfo>
<AssemblyName>System.ComponentModel.Annotations</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<AssemblyVersion>4.3.0.0</AssemblyVersion>
<AssemblyVersion>4.3.1.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.DataAnnotations</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<TypeForwardingChain>
<TypeForwarding From="System.ComponentModel.DataAnnotations" FromVersion="4.0.0.0" To="System.ComponentModel.Annotations" ToVersion="0.0.0.0" FrameworkAlternate="dotnet-uwp-10.0;netcore-2.0" />
</TypeForwardingChain>
<Base>
<BaseTypeName>System.ComponentModel.DataAnnotations.ValidationAttribute</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute FrameworkAlternate="dotnet-uwp-10.0;net-5.0;net-6.0;net-7.0;net-8.0;net-9.0;netcore-1.0;netcore-1.1;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netcore-3.1;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1;netstandard-2.0;netstandard-2.1">
<AttributeName Language="C#">[System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Method | System.AttributeTargets.Parameter | System.AttributeTargets.Property, AllowMultiple=false)]</AttributeName>
<AttributeName Language="F#">[<System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Method | System.AttributeTargets.Parameter | System.AttributeTargets.Property, AllowMultiple=false)>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="net-8.0;net-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.Nullable(0)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.Nullable(0)>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="net-8.0;net-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.NullableContext(2)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.NullableContext(2)>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-3.5">
<AttributeName Language="C#">[System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property, AllowMultiple=false)]</AttributeName>
<AttributeName Language="F#">[<System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property, AllowMultiple=false)>]</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Specifies the name of an additional type to associate with a data field.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.ComponentModel.DataAnnotations.DataTypeAttribute> attribute enables you to mark fields by using a type that is more specific than the database intrinsic type. The type name is selected from the <xref:System.ComponentModel.DataAnnotations.DataType> enumeration type. For example, a string data field that contains email addresses can be specified as the <xref:System.ComponentModel.DataAnnotations.DataType.EmailAddress> type. This information is then accessed by the field templates to modify how the data field is processed.
You use the <xref:System.ComponentModel.DataAnnotations.DataTypeAttribute> attribute for the following reasons:
- To provide additional type information for a data field. You do this by applying the <xref:System.ComponentModel.DataAnnotations.DataTypeAttribute> attribute to a data field in the data model and by specifying the additional type name from the <xref:System.ComponentModel.DataAnnotations.DataType> enumeration. The field template that processes the data field can access this additional metadata type information to determine how to process the field. For example, the text field template can generate hyperlinks for email addresses whose intrinsic type is `String`.
- To associate a custom field template with a data field. The specified custom field template will then be used to process the data field. This is an alternative to using the <xref:System.ComponentModel.DataAnnotations.UIHintAttribute> attribute.
When you apply the <xref:System.ComponentModel.DataAnnotations.DataTypeAttribute> attribute to a data field you must do the following:
- Follow the attribute usage rules.
- Implement the metadata class that contains the data fields to which you want to apply the attribute.
- Issue validation errors as appropriate.
For more information, see [ASP.NET Dynamic Data Guidelines](/previous-versions/aspnet/cc668215(v=vs.100)).
## Examples
The following example uses the <xref:System.ComponentModel.DataAnnotations.DataTypeAttribute> attribute to customize the display of the EmailAddress data field. The email addresses are shown as hyperlinks instead of as simple text, which is what Dynamic Data would infer from the intrinsic data type. The example code is in three parts, and it performs the following steps:
- It implements a metadata partial class and the associated metadata class.
- In the associated metadata class, it applies the <xref:System.ComponentModel.DataAnnotations.DataTypeAttribute> attribute to the EmailAddress data field by specifying the <xref:System.ComponentModel.DataAnnotations.DataType.EmailAddress> enumerated value. This indicates to the Text.ascx field template that it should customize the display of email addresses.
- It modifies the Text.ascx field template to customize the display of the EmailAddress data fields.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.ComponentModel.DataAnnotations.DataTypeAttribute/CS/Customer.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.ComponentModel.DataAnnotations.DataTypeAttribute/VB/Customer.vb" id="Snippet1":::
:::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.ComponentModel.DataAnnotations.DataTypeAttribute/CS/Text.ascx" id="Snippet2":::
:::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.ComponentModel.DataAnnotations.DataTypeAttribute/VB/Text.ascx" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.ComponentModel.DataAnnotations.DataTypeAttribute/CS/Text.ascx.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.ComponentModel.DataAnnotations.DataTypeAttribute/VB/Text.ascx.vb" id="Snippet3":::
To compile and run the example code, you need the following:
- Any edition of Visual Studio 2010 or later.
- The AdventureWorksLT sample database. For information about how to download and install the SQL Server sample database, see [Microsoft SQL Server Product Samples: Database](https://github.com/Microsoft/sql-server-samples/releases) on GitHub. Make sure that you install the correct version of the sample database for the version of SQL Server that you are running.
- A data-driven Web site. This enables you to create a data context for the database and to create the class that contains the data field to customize. For more information, see `Walkthrough: Creating a New Dynamic Data Web Site using Scaffolding`.
]]></format>
</remarks>
<altmember cref="T:System.ComponentModel.DataAnnotations.ValidationAttribute" />
<altmember cref="T:System.ComponentModel.DataAnnotations.UIHintAttribute" />
<altmember cref="T:System.ComponentModel.DataAnnotations.DataType" />
<altmember cref="T:System.AttributeUsageAttribute" />
<altmember cref="T:System.AttributeTargets" />
<related type="Article" href="/previous-versions/aspnet/cc668199(v=vs.100)">How to: Customize Data Field Appearance and Behavior For Non-Intrinsic Data Types in the Data Model</related>
<related type="Article" href="/dotnet/standard/attributes/">Extending Metadata Using Attributes</related>
</Docs>
<Members>
<MemberGroup MemberName=".ctor">
<AssemblyInfo>
<AssemblyName>System.ComponentModel.Annotations</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DataAnnotations.DataTypeAttribute" /> class.</summary>
</Docs>
</MemberGroup>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public DataTypeAttribute (System.ComponentModel.DataAnnotations.DataType dataType);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(valuetype System.ComponentModel.DataAnnotations.DataType dataType) cil managed" />
<MemberSignature Language="DocId" Value="M:System.ComponentModel.DataAnnotations.DataTypeAttribute.#ctor(System.ComponentModel.DataAnnotations.DataType)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (dataType As DataType)" />
<MemberSignature Language="F#" Value="new System.ComponentModel.DataAnnotations.DataTypeAttribute : System.ComponentModel.DataAnnotations.DataType -> System.ComponentModel.DataAnnotations.DataTypeAttribute" Usage="new System.ComponentModel.DataAnnotations.DataTypeAttribute dataType" />
<MemberSignature Language="C++ CLI" Value="public:
 DataTypeAttribute(System::ComponentModel::DataAnnotations::DataType dataType);" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.Annotations</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<AssemblyVersion>4.3.0.0</AssemblyVersion>
<AssemblyVersion>4.3.1.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.DataAnnotations</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="dataType" Type="System.ComponentModel.DataAnnotations.DataType" />
</Parameters>
<Docs>
<param name="dataType">The name of the type to associate with the data field.</param>
<summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DataAnnotations.DataTypeAttribute" /> class by using the specified type name.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The name is one of the values that are defined by the <xref:System.ComponentModel.DataAnnotations.DataType?displayProperty=nameWithType> enumeration.
## Examples
The following example shows how to use the <xref:System.ComponentModel.DataAnnotations.DataTypeAttribute.%23ctor%28System.ComponentModel.DataAnnotations.DataType%29> constructor to specify an alternative type for a data field.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.ComponentModel.DataAnnotations.DataTypeAttribute/CS/Customer.cs" id="Snippet11":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.ComponentModel.DataAnnotations.DataTypeAttribute/VB/Customer.vb" id="Snippet11":::
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public DataTypeAttribute (string customDataType);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string customDataType) cil managed" />
<MemberSignature Language="DocId" Value="M:System.ComponentModel.DataAnnotations.DataTypeAttribute.#ctor(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (customDataType As String)" />
<MemberSignature Language="F#" Value="new System.ComponentModel.DataAnnotations.DataTypeAttribute : string -> System.ComponentModel.DataAnnotations.DataTypeAttribute" Usage="new System.ComponentModel.DataAnnotations.DataTypeAttribute customDataType" />
<MemberSignature Language="C++ CLI" Value="public:
 DataTypeAttribute(System::String ^ customDataType);" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.Annotations</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<AssemblyVersion>4.3.0.0</AssemblyVersion>
<AssemblyVersion>4.3.1.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.DataAnnotations</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="net-8.0;net-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.NullableContext(1)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.NullableContext(1)>]</AttributeName>
</Attribute>
</Attributes>
<Parameters>
<Parameter Name="customDataType" Type="System.String" />
</Parameters>
<Docs>
<param name="customDataType">The name of the custom field template to associate with the data field.</param>
<summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DataAnnotations.DataTypeAttribute" /> class by using the specified field template name.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method provides an alternative to using the <xref:System.ComponentModel.DataAnnotations.UIHintAttribute> attribute.
]]></format>
</remarks>
<exception cref="T:System.ArgumentException">
<paramref name="customDataType" /> is <see langword="null" /> or an empty string ("").</exception>
</Docs>
</Member>
<Member MemberName="CustomDataType">
<MemberSignature Language="C#" Value="public string CustomDataType { get; }" FrameworkAlternate="dotnet-uwp-10.0;netcore-1.0;netcore-1.1;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netcore-3.1;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1;netstandard-2.0" />
<MemberSignature Language="ILAsm" Value=".property instance string CustomDataType" />
<MemberSignature Language="DocId" Value="P:System.ComponentModel.DataAnnotations.DataTypeAttribute.CustomDataType" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property CustomDataType As String" />
<MemberSignature Language="F#" Value="member this.CustomDataType : string" Usage="System.ComponentModel.DataAnnotations.DataTypeAttribute.CustomDataType" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ CustomDataType { System::String ^ get(); };" />
<MemberSignature Language="C#" Value="public string? CustomDataType { get; }" FrameworkAlternate="net-5.0;net-6.0;net-7.0;net-8.0;net-9.0;netstandard-2.1" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.Annotations</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<AssemblyVersion>4.3.0.0</AssemblyVersion>
<AssemblyVersion>4.3.1.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.DataAnnotations</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the name of custom field template that is associated with the data field.</summary>
<value>The name of the custom field template that is associated with the data field.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="DataType">
<MemberSignature Language="C#" Value="public System.ComponentModel.DataAnnotations.DataType DataType { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.ComponentModel.DataAnnotations.DataType DataType" />
<MemberSignature Language="DocId" Value="P:System.ComponentModel.DataAnnotations.DataTypeAttribute.DataType" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property DataType As DataType" />
<MemberSignature Language="F#" Value="member this.DataType : System.ComponentModel.DataAnnotations.DataType" Usage="System.ComponentModel.DataAnnotations.DataTypeAttribute.DataType" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::ComponentModel::DataAnnotations::DataType DataType { System::ComponentModel::DataAnnotations::DataType get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.Annotations</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<AssemblyVersion>4.3.0.0</AssemblyVersion>
<AssemblyVersion>4.3.1.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.DataAnnotations</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.ComponentModel.DataAnnotations.DataType</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the type that is associated with the data field.</summary>
<value>One of the <see cref="T:System.ComponentModel.DataAnnotations.DataType" /> values.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="DisplayFormat">
<MemberSignature Language="C#" Value="public System.ComponentModel.DataAnnotations.DisplayFormatAttribute DisplayFormat { get; protected set; }" FrameworkAlternate="dotnet-uwp-10.0;netcore-1.0;netcore-1.1;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netcore-3.1;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1;netstandard-2.0" />
<MemberSignature Language="ILAsm" Value=".property instance class System.ComponentModel.DataAnnotations.DisplayFormatAttribute DisplayFormat" />
<MemberSignature Language="DocId" Value="P:System.ComponentModel.DataAnnotations.DataTypeAttribute.DisplayFormat" />
<MemberSignature Language="VB.NET" Value="Public Property DisplayFormat As DisplayFormatAttribute" />
<MemberSignature Language="F#" Value="member this.DisplayFormat : System.ComponentModel.DataAnnotations.DisplayFormatAttribute with get, set" Usage="System.ComponentModel.DataAnnotations.DataTypeAttribute.DisplayFormat" />
<MemberSignature Language="C++ CLI" Value="public: property System::ComponentModel::DataAnnotations::DisplayFormatAttribute ^ DisplayFormat { public:
System::ComponentModel::DataAnnotations::DisplayFormatAttribute ^ get(); protected:
 void set(System::ComponentModel::DataAnnotations::DisplayFormatAttribute ^ value); };" />
<MemberSignature Language="C#" Value="public System.ComponentModel.DataAnnotations.DisplayFormatAttribute? DisplayFormat { get; protected set; }" FrameworkAlternate="net-5.0;net-6.0;net-7.0;net-8.0;net-9.0;netstandard-2.1" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.Annotations</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<AssemblyVersion>4.3.0.0</AssemblyVersion>
<AssemblyVersion>4.3.1.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.DataAnnotations</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.ComponentModel.DataAnnotations.DisplayFormatAttribute</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a data-field display format.</summary>
<value>The data-field display format.</value>
<remarks>To be added.</remarks>
<altmember cref="T:System.ComponentModel.DataAnnotations.DisplayFormatAttribute" />
</Docs>
</Member>
<Member MemberName="GetDataTypeName">
<MemberSignature Language="C#" Value="public virtual string GetDataTypeName ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance string GetDataTypeName() cil managed" />
<MemberSignature Language="DocId" Value="M:System.ComponentModel.DataAnnotations.DataTypeAttribute.GetDataTypeName" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function GetDataTypeName () As String" />
<MemberSignature Language="F#" Value="abstract member GetDataTypeName : unit -> string
override this.GetDataTypeName : unit -> string" Usage="dataTypeAttribute.GetDataTypeName " />
<MemberSignature Language="C++ CLI" Value="public:
 virtual System::String ^ GetDataTypeName();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.Annotations</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<AssemblyVersion>4.3.0.0</AssemblyVersion>
<AssemblyVersion>4.3.1.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.DataAnnotations</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="net-8.0;net-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.NullableContext(1)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.NullableContext(1)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Returns the name of the type that is associated with the data field.</summary>
<returns>The name of the type associated with the data field.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The name of the type that is associated with the data field.
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">The current attribute is ill-formed.</exception>
</Docs>
</Member>
<Member MemberName="IsValid">
<MemberSignature Language="C#" Value="public override bool IsValid (object value);" FrameworkAlternate="dotnet-uwp-10.0;netcore-1.0;netcore-1.1;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netcore-3.1;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1;netstandard-2.0" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance bool IsValid(object value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.ComponentModel.DataAnnotations.DataTypeAttribute.IsValid(System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function IsValid (value As Object) As Boolean" />
<MemberSignature Language="F#" Value="override this.IsValid : obj -> bool" Usage="dataTypeAttribute.IsValid value" />
<MemberSignature Language="C++ CLI" Value="public:
 override bool IsValid(System::Object ^ value);" />
<MemberSignature Language="C#" Value="public override bool IsValid (object? value);" FrameworkAlternate="net-5.0;net-6.0;net-7.0;net-8.0;net-9.0;netstandard-2.1" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.Annotations</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<AssemblyVersion>4.3.0.0</AssemblyVersion>
<AssemblyVersion>4.3.1.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.DataAnnotations</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Object" />
</Parameters>
<Docs>
<param name="value">The data field value to validate.</param>
<summary>Checks that the value of the data field is valid.</summary>
<returns>
<see langword="true" /> always.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method implements validation logic that is specific to the <xref:System.ComponentModel.DataAnnotations.DataTypeAttribute> attribute.
]]></format>
</remarks>
<altmember cref="T:System.ComponentModel.DataAnnotations.ValidationAttribute" />
<exception cref="T:System.InvalidOperationException">The current attribute is ill-formed.</exception>
</Docs>
</Member>
</Members>
</Type>