Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
AbstractMemoryBlock.cs
Go to the documentation of this file.
1
using
System.Collections.Immutable
;
2
using
System.Reflection.Metadata
;
3
4
namespace
System.Reflection.Internal
;
5
6
internal
abstract
class
AbstractMemoryBlock
:
IDisposable
7
{
8
public
unsafe
abstract
byte
*
Pointer
{
get
; }
9
10
public
abstract
int
Size
{
get
; }
11
12
public
unsafe
BlobReader
GetReader
()
13
{
14
return
new
BlobReader
(
Pointer
,
Size
);
15
}
16
17
public
unsafe
virtual
ImmutableArray<byte>
GetContentUnchecked
(
int
start
,
int
length
)
18
{
19
ImmutableArray<byte>
result =
BlobUtilities
.
ReadImmutableBytes
(
Pointer
+
start
,
length
);
20
GC
.
KeepAlive
(
this
);
21
return
result;
22
}
23
24
public
abstract
void
Dispose
();
25
}
System.Collections.Immutable.ImmutableArray
Definition
ImmutableArray.cs:223
System.GC.KeepAlive
static void KeepAlive(object? obj)
Definition
GC.cs:180
System.GC
Definition
GC.cs:8
System.Reflection.BlobUtilities.ReadImmutableBytes
static unsafe ImmutableArray< byte > ReadImmutableBytes(byte *buffer, int byteCount)
Definition
BlobUtilities.cs:25
System.Reflection.BlobUtilities
Definition
BlobUtilities.cs:9
System.Reflection.Internal.AbstractMemoryBlock.Dispose
void Dispose()
System.Reflection.Internal.AbstractMemoryBlock.GetReader
unsafe BlobReader GetReader()
Definition
AbstractMemoryBlock.cs:12
System.Reflection.Internal.AbstractMemoryBlock.GetContentUnchecked
virtual unsafe ImmutableArray< byte > GetContentUnchecked(int start, int length)
Definition
AbstractMemoryBlock.cs:17
System.Reflection.Internal.AbstractMemoryBlock.Size
int Size
Definition
AbstractMemoryBlock.cs:10
System.Reflection.Internal.AbstractMemoryBlock
Definition
AbstractMemoryBlock.cs:7
System.Reflection.Pointer
Definition
Pointer.cs:8
System.IDisposable
Definition
IDisposable.cs:4
System.Collections.Immutable
Definition
AllocFreeConcurrentStack.cs:4
System.Reflection.Internal
Definition
AbstractMemoryBlock.cs:4
System.Reflection.Metadata
Definition
AssemblyExtensions.cs:4
System.ExceptionArgument.length
@ length
System.ExceptionArgument.start
@ start
System.Reflection.Metadata.BlobReader
Definition
BlobReader.cs:10
source
System.Reflection.Metadata
System.Reflection.Internal
AbstractMemoryBlock.cs
Generated by
1.10.0