Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
ByteArrayMemoryBlock.cs
Go to the documentation of this file.
1
using
System.Collections.Immutable
;
2
3
namespace
System.Reflection.Internal
;
4
5
internal
sealed
class
ByteArrayMemoryBlock
:
AbstractMemoryBlock
6
{
7
private
ByteArrayMemoryProvider
_provider
;
8
9
private
readonly
int
_start
;
10
11
private
readonly
int
_size
;
12
13
public
unsafe
override
byte
*
Pointer
=> _provider.Pointer +
_start
;
14
15
public
override
int
Size
=>
_size
;
16
17
internal
ByteArrayMemoryBlock
(
ByteArrayMemoryProvider
provider,
int
start
,
int
size)
18
{
19
_provider
= provider;
20
_size
= size;
21
_start
=
start
;
22
}
23
24
public
override
void
Dispose
()
25
{
26
_provider
=
null
;
27
}
28
29
public
override
ImmutableArray<byte>
GetContentUnchecked
(
int
start
,
int
length
)
30
{
31
return
ImmutableArray
.Create(
_provider
.
Array
,
_start
+
start
,
length
);
32
}
33
}
System.Collections.Immutable.ImmutableArray
Definition
ImmutableArray.cs:223
System.Reflection.Internal.AbstractMemoryBlock
Definition
AbstractMemoryBlock.cs:7
System.Reflection.Internal.ByteArrayMemoryBlock.ByteArrayMemoryBlock
ByteArrayMemoryBlock(ByteArrayMemoryProvider provider, int start, int size)
Definition
ByteArrayMemoryBlock.cs:17
System.Reflection.Internal.ByteArrayMemoryBlock._size
readonly int _size
Definition
ByteArrayMemoryBlock.cs:11
System.Reflection.Internal.ByteArrayMemoryBlock.Size
override int Size
Definition
ByteArrayMemoryBlock.cs:15
System.Reflection.Internal.ByteArrayMemoryBlock.Dispose
override void Dispose()
Definition
ByteArrayMemoryBlock.cs:24
System.Reflection.Internal.ByteArrayMemoryBlock.GetContentUnchecked
override ImmutableArray< byte > GetContentUnchecked(int start, int length)
Definition
ByteArrayMemoryBlock.cs:29
System.Reflection.Internal.ByteArrayMemoryBlock._provider
ByteArrayMemoryProvider _provider
Definition
ByteArrayMemoryBlock.cs:7
System.Reflection.Internal.ByteArrayMemoryBlock._start
readonly int _start
Definition
ByteArrayMemoryBlock.cs:9
System.Reflection.Internal.ByteArrayMemoryBlock
Definition
ByteArrayMemoryBlock.cs:6
System.Reflection.Internal.ByteArrayMemoryProvider.Array
ImmutableArray< byte > Array
Definition
ByteArrayMemoryProvider.cs:15
System.Reflection.Internal.ByteArrayMemoryProvider
Definition
ByteArrayMemoryProvider.cs:8
System.Reflection.Pointer
Definition
Pointer.cs:8
System.Collections.Immutable
Definition
AllocFreeConcurrentStack.cs:4
System.Reflection.Internal
Definition
AbstractMemoryBlock.cs:4
System.ExceptionArgument.length
@ length
System.ExceptionArgument.start
@ start
source
System.Reflection.Metadata
System.Reflection.Internal
ByteArrayMemoryBlock.cs
Generated by
1.10.0