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