Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
DocumentNameBlobHandle.cs
Go to the documentation of this file.
1
using
System.Diagnostics.CodeAnalysis
;
2
3
namespace
System.Reflection.Metadata
;
4
5
public
readonly
struct
DocumentNameBlobHandle
:
IEquatable
<DocumentNameBlobHandle>
6
{
7
private
readonly
int
_heapOffset
;
8
9
public
bool
IsNil
=>
_heapOffset
== 0;
10
11
private
DocumentNameBlobHandle
(
int
heapOffset)
12
{
13
_heapOffset
= heapOffset;
14
}
15
16
internal
static
DocumentNameBlobHandle
FromOffset
(
int
heapOffset)
17
{
18
return
new
DocumentNameBlobHandle
(heapOffset);
19
}
20
21
public
static
implicit
operator
BlobHandle
(
DocumentNameBlobHandle
handle
)
22
{
23
return
BlobHandle
.
FromOffset
(
handle
._heapOffset);
24
}
25
26
public
static
explicit
operator
DocumentNameBlobHandle
(
BlobHandle
handle
)
27
{
28
if
(
handle
.IsVirtual)
29
{
30
Throw
.
InvalidCast
();
31
}
32
return
FromOffset
(
handle
.GetHeapOffset());
33
}
34
35
public
override
bool
Equals
([NotNullWhen(
true
)]
object
?
obj
)
36
{
37
if
(
obj
is
DocumentNameBlobHandle
other
)
38
{
39
return
Equals
(
other
);
40
}
41
return
false
;
42
}
43
44
public
bool
Equals
(
DocumentNameBlobHandle
other
)
45
{
46
return
_heapOffset
==
other
._heapOffset;
47
}
48
49
public
override
int
GetHashCode
()
50
{
51
return
_heapOffset
;
52
}
53
54
public
static
bool
operator ==
(
DocumentNameBlobHandle
left,
DocumentNameBlobHandle
right)
55
{
56
return
left.
Equals
(right);
57
}
58
59
public
static
bool
operator !=
(
DocumentNameBlobHandle
left,
DocumentNameBlobHandle
right)
60
{
61
return
!left.
Equals
(right);
62
}
63
}
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.Diagnostics.CodeAnalysis
Definition
AllowNullAttribute.cs:1
System.Reflection.Metadata
Definition
AssemblyExtensions.cs:4
System.ExceptionArgument.other
@ other
System.ExceptionArgument.obj
@ obj
System.ExceptionArgument.handle
@ handle
System.Reflection.Metadata.BlobHandle.FromOffset
static BlobHandle FromOffset(int heapOffset)
Definition
BlobHandle.cs:34
System.Reflection.Metadata.BlobHandle
Definition
BlobHandle.cs:6
System.Reflection.Metadata.DocumentNameBlobHandle.IsNil
bool IsNil
Definition
DocumentNameBlobHandle.cs:9
System.Reflection.Metadata.DocumentNameBlobHandle.operator==
static bool operator==(DocumentNameBlobHandle left, DocumentNameBlobHandle right)
Definition
DocumentNameBlobHandle.cs:54
System.Reflection.Metadata.DocumentNameBlobHandle.DocumentNameBlobHandle
DocumentNameBlobHandle(int heapOffset)
Definition
DocumentNameBlobHandle.cs:11
System.Reflection.Metadata.DocumentNameBlobHandle._heapOffset
readonly int _heapOffset
Definition
DocumentNameBlobHandle.cs:7
System.Reflection.Metadata.DocumentNameBlobHandle.Equals
override bool Equals([NotNullWhen(true)] object? obj)
Definition
DocumentNameBlobHandle.cs:35
System.Reflection.Metadata.DocumentNameBlobHandle.GetHashCode
override int GetHashCode()
Definition
DocumentNameBlobHandle.cs:49
System.Reflection.Metadata.DocumentNameBlobHandle.Equals
bool Equals(DocumentNameBlobHandle other)
Definition
DocumentNameBlobHandle.cs:44
System.Reflection.Metadata.DocumentNameBlobHandle.FromOffset
static DocumentNameBlobHandle FromOffset(int heapOffset)
Definition
DocumentNameBlobHandle.cs:16
System.Reflection.Metadata.DocumentNameBlobHandle.operator!=
static bool operator!=(DocumentNameBlobHandle left, DocumentNameBlobHandle right)
Definition
DocumentNameBlobHandle.cs:59
System.Reflection.Metadata.DocumentNameBlobHandle
Definition
DocumentNameBlobHandle.cs:6
source
System.Reflection.Metadata
System.Reflection.Metadata
DocumentNameBlobHandle.cs
Generated by
1.10.0