Terraria
v1.4.4.9
Terraria source code documentation
Toggle main menu visibility
Main Page
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
x
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Properties
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Events
_
a
c
d
e
f
i
l
m
o
p
r
s
t
u
w
Files
File List
File Members
All
Enumerations
Macros
•
All
Classes
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Properties
Events
Macros
Loading...
Searching...
No Matches
ConstantHandle.cs
Go to the documentation of this file.
1
namespace
System.Reflection.Metadata
;
2
3
public
readonly
struct
ConstantHandle
:
IEquatable
<ConstantHandle>
4
{
5
private
readonly
int
_rowId
;
6
7
public
bool
IsNil
=>
RowId
== 0;
8
9
internal
int
RowId
=>
_rowId
;
10
11
private
ConstantHandle
(
int
rowId)
12
{
13
_rowId
= rowId;
14
}
11
private
ConstantHandle
(
int
rowId) {
…
}
15
16
internal
static
ConstantHandle
FromRowId
(
int
rowId)
17
{
18
return
new
ConstantHandle
(rowId);
19
}
16
internal
static
ConstantHandle
FromRowId
(
int
rowId) {
…
}
20
21
public
static
implicit
operator
Handle
(
ConstantHandle
handle
)
22
{
23
return
new
Handle
(11,
handle
._rowId);
24
}
21
public
static
implicit
operator
Handle
(
ConstantHandle
handle
) {
…
}
25
26
public
static
implicit
operator
EntityHandle
(
ConstantHandle
handle
)
27
{
28
return
new
EntityHandle
((uint)(0xB000000uL | (ulong)
handle
._rowId));
29
}
26
public
static
implicit
operator
EntityHandle
(
ConstantHandle
handle
) {
…
}
30
31
public
static
explicit
operator
ConstantHandle
(
Handle
handle
)
32
{
33
if
(
handle
.VType != 11)
34
{
35
Throw
.
InvalidCast
();
36
}
37
return
new
ConstantHandle
(
handle
.RowId);
38
}
31
public
static
explicit
operator
ConstantHandle
(
Handle
handle
) {
…
}
39
40
public
static
explicit
operator
ConstantHandle
(
EntityHandle
handle
)
41
{
42
if
(
handle
.VType != 184549376)
43
{
44
Throw
.
InvalidCast
();
45
}
46
return
new
ConstantHandle
(
handle
.RowId);
47
}
40
public
static
explicit
operator
ConstantHandle
(
EntityHandle
handle
) {
…
}
48
49
public
static
bool
operator ==
(
ConstantHandle
left,
ConstantHandle
right)
50
{
51
return
left._rowId == right.
_rowId
;
52
}
49
public
static
bool
operator ==
(
ConstantHandle
left,
ConstantHandle
right) {
…
}
53
54
public
override
bool
Equals
(
object
?
obj
)
55
{
56
if
(
obj
is
ConstantHandle
)
57
{
58
return
((
ConstantHandle
)
obj
)._rowId ==
_rowId
;
59
}
60
return
false
;
61
}
54
public
override
bool
Equals
(
object
?
obj
) {
…
}
62
63
public
bool
Equals
(
ConstantHandle
other
)
64
{
65
return
_rowId
==
other
._rowId;
66
}
63
public
bool
Equals
(
ConstantHandle
other
) {
…
}
67
68
public
override
int
GetHashCode
()
69
{
70
return
_rowId
.GetHashCode();
71
}
68
public
override
int
GetHashCode
() {
…
}
72
73
public
static
bool
operator !=
(
ConstantHandle
left,
ConstantHandle
right)
74
{
75
return
left._rowId != right.
_rowId
;
76
}
73
public
static
bool
operator !=
(
ConstantHandle
left,
ConstantHandle
right) {
…
}
77
}
3
public
readonly
struct
ConstantHandle
:
IEquatable
<ConstantHandle> {
…
};
System.Reflection.Throw.InvalidCast
static void InvalidCast()
Definition
Throw.cs:12
System.Reflection.Throw
Definition
Throw.cs:9
System.IEquatable
Definition
IEquatable.cs:4
System.Reflection.Metadata
Definition
AssemblyExtensions.cs:4
System.ExceptionArgument.other
@ other
System.ExceptionArgument.obj
@ obj
System.ExceptionArgument.handle
@ handle
System.Reflection.Metadata.ConstantHandle.operator!=
static bool operator!=(ConstantHandle left, ConstantHandle right)
Definition
ConstantHandle.cs:73
System.Reflection.Metadata.ConstantHandle.Equals
bool Equals(ConstantHandle other)
Definition
ConstantHandle.cs:63
System.Reflection.Metadata.ConstantHandle.ConstantHandle
ConstantHandle(int rowId)
Definition
ConstantHandle.cs:11
System.Reflection.Metadata.ConstantHandle.IsNil
bool IsNil
Definition
ConstantHandle.cs:7
System.Reflection.Metadata.ConstantHandle._rowId
readonly int _rowId
Definition
ConstantHandle.cs:5
System.Reflection.Metadata.ConstantHandle.RowId
int RowId
Definition
ConstantHandle.cs:9
System.Reflection.Metadata.ConstantHandle.GetHashCode
override int GetHashCode()
Definition
ConstantHandle.cs:68
System.Reflection.Metadata.ConstantHandle.operator==
static bool operator==(ConstantHandle left, ConstantHandle right)
Definition
ConstantHandle.cs:49
System.Reflection.Metadata.ConstantHandle.Equals
override bool Equals(object? obj)
Definition
ConstantHandle.cs:54
System.Reflection.Metadata.ConstantHandle.FromRowId
static ConstantHandle FromRowId(int rowId)
Definition
ConstantHandle.cs:16
System.Reflection.Metadata.ConstantHandle
Definition
ConstantHandle.cs:4
System.Reflection.Metadata.EntityHandle
Definition
EntityHandle.cs:6
System.Reflection.Metadata.Handle
Definition
Handle.cs:6
source
System.Reflection.Metadata
System.Reflection.Metadata
ConstantHandle.cs
Generated by
1.10.0