Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
MetadataTypeAttribute.cs
Go to the documentation of this file.
1
using
System.Diagnostics.CodeAnalysis
;
2
3
namespace
System.ComponentModel.DataAnnotations
;
4
5
[AttributeUsage(
AttributeTargets
.Class, AllowMultiple =
false
)]
6
public
sealed
class
MetadataTypeAttribute
:
Attribute
7
{
8
[DynamicallyAccessedMembers(
DynamicallyAccessedMemberTypes
.All)]
9
private
readonly
Type
_metadataClassType
;
10
11
[DynamicallyAccessedMembers(
DynamicallyAccessedMemberTypes
.All)]
12
public
Type
MetadataClassType
13
{
14
get
15
{
16
if
(
_metadataClassType
==
null
)
17
{
18
throw
new
InvalidOperationException
(
System
.
SR
.
MetadataTypeAttribute_TypeCannotBeNull
);
19
}
20
return
_metadataClassType
;
21
}
22
}
23
24
public
MetadataTypeAttribute
([DynamicallyAccessedMembers(
DynamicallyAccessedMemberTypes
.All)]
Type
metadataClassType)
25
{
26
_metadataClassType
= metadataClassType;
27
}
28
}
System.Attribute
Definition
Attribute.cs:12
System.ComponentModel.DataAnnotations.MetadataTypeAttribute.MetadataTypeAttribute
MetadataTypeAttribute([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type metadataClassType)
Definition
MetadataTypeAttribute.cs:24
System.ComponentModel.DataAnnotations.MetadataTypeAttribute.MetadataClassType
Type MetadataClassType
Definition
MetadataTypeAttribute.cs:13
System.ComponentModel.DataAnnotations.MetadataTypeAttribute._metadataClassType
readonly Type _metadataClassType
Definition
MetadataTypeAttribute.cs:9
System.ComponentModel.DataAnnotations.MetadataTypeAttribute
Definition
MetadataTypeAttribute.cs:7
System.InvalidOperationException
Definition
InvalidOperationException.cs:9
System.SR.MetadataTypeAttribute_TypeCannotBeNull
static string MetadataTypeAttribute_TypeCannotBeNull
Definition
SR.cs:62
System.SR
Definition
SR.cs:7
System.Type
Definition
Type.cs:14
System.ComponentModel.DataAnnotations
Definition
ColumnAttribute.cs:3
System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes
DynamicallyAccessedMemberTypes
Definition
DynamicallyAccessedMemberTypes.cs:5
System.Diagnostics.CodeAnalysis
Definition
AllowNullAttribute.cs:1
System.AttributeTargets
AttributeTargets
Definition
AttributeTargets.cs:5
System
Definition
BlockingCollection.cs:8
source
System.ComponentModel.Annotations
System.ComponentModel.DataAnnotations
MetadataTypeAttribute.cs
Generated by
1.10.0