Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
ImmutableObjectAttribute.cs
Go to the documentation of this file.
1
using
System.Diagnostics.CodeAnalysis
;
2
3
namespace
System.ComponentModel
;
4
5
[AttributeUsage(
AttributeTargets
.All)]
6
public
sealed
class
ImmutableObjectAttribute
:
Attribute
7
{
8
public
static
readonly
ImmutableObjectAttribute
Yes
=
new
ImmutableObjectAttribute
(immutable: true);
9
10
public
static
readonly
ImmutableObjectAttribute
No
=
new
ImmutableObjectAttribute
(immutable: false);
11
12
public
static
readonly
ImmutableObjectAttribute
Default
=
No
;
13
14
public
bool
Immutable {
get
; }
15
16
public
ImmutableObjectAttribute
(
bool
immutable)
17
{
18
Immutable = immutable;
19
}
20
21
public
override
bool
Equals
([NotNullWhen(
true
)]
object
?
obj
)
22
{
23
if
(
obj
is
ImmutableObjectAttribute
immutableObjectAttribute)
24
{
25
return
immutableObjectAttribute.Immutable ==
Immutable
;
26
}
27
return
false
;
28
}
29
30
public
override
int
GetHashCode
()
31
{
32
return
base.GetHashCode();
33
}
34
35
public
override
bool
IsDefaultAttribute
()
36
{
37
return
Equals
(
Default
);
38
}
39
}
System.Attribute
Definition
Attribute.cs:12
System.ComponentModel.ImmutableObjectAttribute.Immutable
bool Immutable
Definition
ImmutableObjectAttribute.cs:14
System.ComponentModel.ImmutableObjectAttribute.Yes
static readonly ImmutableObjectAttribute Yes
Definition
ImmutableObjectAttribute.cs:8
System.ComponentModel.ImmutableObjectAttribute.No
static readonly ImmutableObjectAttribute No
Definition
ImmutableObjectAttribute.cs:10
System.ComponentModel.ImmutableObjectAttribute.GetHashCode
override int GetHashCode()
Definition
ImmutableObjectAttribute.cs:30
System.ComponentModel.ImmutableObjectAttribute.Default
static readonly ImmutableObjectAttribute Default
Definition
ImmutableObjectAttribute.cs:12
System.ComponentModel.ImmutableObjectAttribute.ImmutableObjectAttribute
ImmutableObjectAttribute(bool immutable)
Definition
ImmutableObjectAttribute.cs:16
System.ComponentModel.ImmutableObjectAttribute.Equals
override bool Equals([NotNullWhen(true)] object? obj)
Definition
ImmutableObjectAttribute.cs:21
System.ComponentModel.ImmutableObjectAttribute.IsDefaultAttribute
override bool IsDefaultAttribute()
Definition
ImmutableObjectAttribute.cs:35
System.ComponentModel.ImmutableObjectAttribute
Definition
ImmutableObjectAttribute.cs:7
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.Primitives
System.ComponentModel
ImmutableObjectAttribute.cs
Generated by
1.10.0