Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
ColumnAttribute.cs
Go to the documentation of this file.
1
using
System.Diagnostics.CodeAnalysis
;
2
3
namespace
System.ComponentModel.DataAnnotations.Schema
;
4
5
[AttributeUsage(
AttributeTargets
.Property |
AttributeTargets
.Field, AllowMultiple =
false
)]
6
public
class
ColumnAttribute
:
Attribute
7
{
8
private
int
_order
= -1;
9
10
private
string
_typeName
;
11
12
public
string
?
Name
{
get
; }
13
14
public
int
Order
15
{
16
get
17
{
18
return
_order
;
19
}
20
set
21
{
22
if
(
value
< 0)
23
{
24
throw
new
ArgumentOutOfRangeException
(
"value"
);
25
}
26
_order
=
value
;
27
}
28
}
29
30
public
string
?
TypeName
31
{
32
get
33
{
34
return
_typeName
;
35
}
36
[param: DisallowNull]
37
set
38
{
39
if
(
string
.IsNullOrWhiteSpace(
value
))
40
{
41
throw
new
ArgumentException
(
System
.
SR
.
Format
(
System
.
SR
.
ArgumentIsNullOrWhitespace
,
"value"
),
"value"
);
42
}
43
_typeName
=
value
;
44
}
45
}
46
47
public
ColumnAttribute
()
48
{
49
}
50
51
public
ColumnAttribute
(
string
name)
52
{
53
if
(
string
.IsNullOrWhiteSpace(name))
54
{
55
throw
new
ArgumentException
(
System
.
SR
.
Format
(
System
.
SR
.
ArgumentIsNullOrWhitespace
,
"name"
),
"name"
);
56
}
57
Name
= name;
58
}
59
}
System.ArgumentException
Definition
ArgumentException.cs:9
System.ArgumentOutOfRangeException
Definition
ArgumentOutOfRangeException.cs:9
System.Attribute
Definition
Attribute.cs:12
System.ComponentModel.DataAnnotations.Schema.ColumnAttribute.Name
string? Name
Definition
ColumnAttribute.cs:12
System.ComponentModel.DataAnnotations.Schema.ColumnAttribute.ColumnAttribute
ColumnAttribute(string name)
Definition
ColumnAttribute.cs:51
System.ComponentModel.DataAnnotations.Schema.ColumnAttribute.Order
int Order
Definition
ColumnAttribute.cs:15
System.ComponentModel.DataAnnotations.Schema.ColumnAttribute._order
int _order
Definition
ColumnAttribute.cs:8
System.ComponentModel.DataAnnotations.Schema.ColumnAttribute._typeName
string _typeName
Definition
ColumnAttribute.cs:10
System.ComponentModel.DataAnnotations.Schema.ColumnAttribute.ColumnAttribute
ColumnAttribute()
Definition
ColumnAttribute.cs:47
System.ComponentModel.DataAnnotations.Schema.ColumnAttribute.TypeName
string? TypeName
Definition
ColumnAttribute.cs:31
System.ComponentModel.DataAnnotations.Schema.ColumnAttribute
Definition
ColumnAttribute.cs:7
System.SR.Format
static string Format(string resourceFormat, object p1)
Definition
SR.cs:118
System.SR.ArgumentIsNullOrWhitespace
static string ArgumentIsNullOrWhitespace
Definition
SR.cs:14
System.SR
Definition
SR.cs:7
System.ComponentModel.DataAnnotations.Schema
Definition
ColumnAttribute.cs:3
System.Diagnostics.CodeAnalysis
Definition
AllowNullAttribute.cs:1
System.ExceptionArgument.value
@ value
System.AttributeTargets
AttributeTargets
Definition
AttributeTargets.cs:5
System
Definition
BlockingCollection.cs:8
source
System.ComponentModel.Annotations
System.ComponentModel.DataAnnotations.Schema
ColumnAttribute.cs
Generated by
1.10.0