Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ MetadataBuilder()

System.Reflection.Metadata.Ecma335.MetadataBuilder.MetadataBuilder ( int userStringHeapStartOffset = 0,
int stringHeapStartOffset = 0,
int blobHeapStartOffset = 0,
int guidHeapStartOffset = 0 )
inline

Definition at line 2393 of file MetadataBuilder.cs.

2394 {
2395 if (userStringHeapStartOffset >= 16777215)
2396 {
2397 Throw.HeapSizeLimitExceeded(HeapIndex.UserString);
2398 }
2400 {
2401 Throw.ArgumentOutOfRange("userStringHeapStartOffset");
2402 }
2403 if (stringHeapStartOffset < 0)
2404 {
2405 Throw.ArgumentOutOfRange("stringHeapStartOffset");
2406 }
2407 if (blobHeapStartOffset < 0)
2408 {
2409 Throw.ArgumentOutOfRange("blobHeapStartOffset");
2410 }
2411 if (guidHeapStartOffset < 0)
2412 {
2413 Throw.ArgumentOutOfRange("guidHeapStartOffset");
2414 }
2415 if (guidHeapStartOffset % 16 != 0)
2416 {
2417 throw new ArgumentException(System.SR.Format(System.SR.ValueMustBeMultiple, 16), "guidHeapStartOffset");
2418 }
2420 _blobs.Add(ImmutableArray<byte>.Empty, default(BlobHandle));
2421 _blobHeapSize = 1;
2426 }
void Add(TKey key, TValue value)
void WriteBytes(byte value, int byteCount)
readonly Dictionary< ImmutableArray< byte >, BlobHandle > _blobs
static string ValueMustBeMultiple
Definition SR.cs:218
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
Definition SR.cs:7

References System.Reflection.Metadata.Ecma335.MetadataBuilder._blobHeapSize, System.Reflection.Metadata.Ecma335.MetadataBuilder._blobHeapStartOffset, System.Reflection.Metadata.Ecma335.MetadataBuilder._blobs, System.Reflection.Metadata.Ecma335.MetadataBuilder._guidBuilder, System.Reflection.Metadata.Ecma335.MetadataBuilder._stringHeapStartOffset, System.Reflection.Metadata.Ecma335.MetadataBuilder._userStringBuilder, System.Reflection.Metadata.Ecma335.MetadataBuilder._userStringHeapStartOffset, System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Reflection.Throw.ArgumentOutOfRange(), System.SR.Format(), System.Reflection.Throw.HeapSizeLimitExceeded(), System.SR.ValueMustBeMultiple, System.Reflection.Metadata.BlobBuilder.WriteByte(), and System.Reflection.Metadata.BlobBuilder.WriteBytes().