Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
DataObjectFieldAttribute.cs
Go to the documentation of this file.
1
using
System.Diagnostics.CodeAnalysis
;
2
3
namespace
System.ComponentModel
;
4
5
[AttributeUsage(
AttributeTargets
.Property)]
6
public
sealed
class
DataObjectFieldAttribute
:
Attribute
7
{
8
public
bool
IsIdentity
{
get
; }
9
10
public
bool
IsNullable
{
get
; }
11
12
public
int
Length
{
get
; }
13
14
public
bool
PrimaryKey
{
get
; }
15
16
public
DataObjectFieldAttribute
(
bool
primaryKey)
17
: this(primaryKey, isIdentity: false, isNullable: false, -1)
18
{
19
}
20
21
public
DataObjectFieldAttribute
(
bool
primaryKey,
bool
isIdentity)
22
: this(primaryKey, isIdentity, isNullable: false, -1)
23
{
24
}
25
26
public
DataObjectFieldAttribute
(
bool
primaryKey,
bool
isIdentity,
bool
isNullable)
27
: this(primaryKey, isIdentity, isNullable, -1)
28
{
29
}
30
31
public
DataObjectFieldAttribute
(
bool
primaryKey,
bool
isIdentity,
bool
isNullable,
int
length
)
32
{
33
PrimaryKey
= primaryKey;
34
IsIdentity
= isIdentity;
35
IsNullable
= isNullable;
36
Length
=
length
;
37
}
38
39
public
override
bool
Equals
([NotNullWhen(
true
)]
object
?
obj
)
40
{
41
if
(
obj
==
this
)
42
{
43
return
true
;
44
}
45
if
(
obj
is
DataObjectFieldAttribute
dataObjectFieldAttribute && dataObjectFieldAttribute.
IsIdentity
==
IsIdentity
&& dataObjectFieldAttribute.IsNullable ==
IsNullable
&& dataObjectFieldAttribute.Length ==
Length
)
46
{
47
return
dataObjectFieldAttribute.PrimaryKey ==
PrimaryKey
;
48
}
49
return
false
;
50
}
51
52
public
override
int
GetHashCode
()
53
{
54
return
base.GetHashCode();
55
}
56
}
System.Attribute
Definition
Attribute.cs:12
System.ComponentModel.DataObjectFieldAttribute.GetHashCode
override int GetHashCode()
Definition
DataObjectFieldAttribute.cs:52
System.ComponentModel.DataObjectFieldAttribute.DataObjectFieldAttribute
DataObjectFieldAttribute(bool primaryKey, bool isIdentity)
Definition
DataObjectFieldAttribute.cs:21
System.ComponentModel.DataObjectFieldAttribute.DataObjectFieldAttribute
DataObjectFieldAttribute(bool primaryKey, bool isIdentity, bool isNullable)
Definition
DataObjectFieldAttribute.cs:26
System.ComponentModel.DataObjectFieldAttribute.DataObjectFieldAttribute
DataObjectFieldAttribute(bool primaryKey, bool isIdentity, bool isNullable, int length)
Definition
DataObjectFieldAttribute.cs:31
System.ComponentModel.DataObjectFieldAttribute.IsIdentity
bool IsIdentity
Definition
DataObjectFieldAttribute.cs:8
System.ComponentModel.DataObjectFieldAttribute.IsNullable
bool IsNullable
Definition
DataObjectFieldAttribute.cs:10
System.ComponentModel.DataObjectFieldAttribute.DataObjectFieldAttribute
DataObjectFieldAttribute(bool primaryKey)
Definition
DataObjectFieldAttribute.cs:16
System.ComponentModel.DataObjectFieldAttribute.Equals
override bool Equals([NotNullWhen(true)] object? obj)
Definition
DataObjectFieldAttribute.cs:39
System.ComponentModel.DataObjectFieldAttribute.Length
int Length
Definition
DataObjectFieldAttribute.cs:12
System.ComponentModel.DataObjectFieldAttribute.PrimaryKey
bool PrimaryKey
Definition
DataObjectFieldAttribute.cs:14
System.ComponentModel.DataObjectFieldAttribute
Definition
DataObjectFieldAttribute.cs:7
System.ComponentModel
Definition
ColumnAttribute.cs:3
System.Diagnostics.CodeAnalysis
Definition
AllowNullAttribute.cs:1
System.ExceptionArgument.length
@ length
System.ExceptionArgument.obj
@ obj
System.AttributeTargets
AttributeTargets
Definition
AttributeTargets.cs:5
source
System.ComponentModel.TypeConverter
System.ComponentModel
DataObjectFieldAttribute.cs
Generated by
1.10.0