31 references to BlobUtilities
System.Reflection.Metadata (31)
System\Reflection\Metadata\BlobBuilder.cs (9)
273
BlobUtilities
.ValidateRange(Count, start, byteCount, nameof(byteCount));
760
BlobUtilities
.ValidateRange(buffer.Length, start, byteCount, nameof(byteCount));
787
BlobUtilities
.ValidateRange(buffer.Length, start, byteCount, nameof(byteCount));
916
int start = ReserveBytesPrimitive(
BlobUtilities
.SizeOfSerializedDecimal);
923
int start = ReserveBytesPrimitive(
BlobUtilities
.SizeOfGuid);
1051
WriteCompressedInteger(
BlobUtilities
.GetUserStringByteLength(value.Length));
1053
WriteByte(
BlobUtilities
.GetUserStringTrailingByte(value));
1094
int bytesToCurrent =
BlobUtilities
.GetUTF8ByteCount(currentPtr, length, byteLimit, out nextPtr);
1097
int bytesToNext =
BlobUtilities
.GetUTF8ByteCount(nextPtr, charsToNext);
System\Reflection\Metadata\BlobContentId.cs (1)
13
private const int Size =
BlobUtilities
.SizeOfGuid + sizeof(uint);
System\Reflection\Metadata\BlobWriter.cs (9)
89
BlobUtilities
.ValidateRange(Length, start, byteCount, nameof(byteCount));
102
BlobUtilities
.ValidateRange(Length, start, byteCount, nameof(byteCount));
207
BlobUtilities
.ValidateRange(buffer.Length, start, byteCount, nameof(byteCount));
232
BlobUtilities
.ValidateRange(buffer.Length, start, byteCount, nameof(byteCount));
333
int start = Advance(
BlobUtilities
.SizeOfSerializedDecimal);
339
int start = Advance(
BlobUtilities
.SizeOfGuid);
448
WriteCompressedInteger(
BlobUtilities
.GetUserStringByteLength(value.Length));
450
WriteByte(
BlobUtilities
.GetUserStringTrailingByte(value));
472
int byteCount =
BlobUtilities
.GetUTF8ByteCount(charPtr, length);
System\Reflection\Metadata\Ecma335\MetadataBuilder.Heaps.cs (6)
107
if (guidHeapStartOffset %
BlobUtilities
.SizeOfGuid != 0)
109
throw new ArgumentException(SR.Format(SR.ValueMustBeMultiple,
BlobUtilities
.SizeOfGuid), nameof(guidHeapStartOffset));
418
var content = _guidBuilder.ReserveBytes(
BlobUtilities
.SizeOfGuid);
482
int encodedLength =
BlobUtilities
.GetUserStringByteLength(length);
558
if (prev.EndsWith(entry.Key, StringComparison.Ordinal) && !
BlobUtilities
.IsLowSurrogateChar(entry.Key[0]))
561
stringVirtualIndexToHeapOffsetMap[entry.Value.GetWriterVirtualIndex()] = position - (
BlobUtilities
.GetUTF8ByteCount(entry.Key) + 1);
System\Reflection\Metadata\Ecma335\MetadataRootBuilder.cs (2)
61
Debug.Assert(
BlobUtilities
.GetUTF8ByteCount(DefaultMetadataVersionString) == DefaultMetadataVersionString.Length);
62
int metadataVersionByteCount = metadataVersion != null ?
BlobUtilities
.GetUTF8ByteCount(metadataVersion) : DefaultMetadataVersionString.Length;
System\Reflection\Metadata\Ecma335\PortablePdbBuilder.cs (1)
63
Debug.Assert(
BlobUtilities
.GetUTF8ByteCount(MetadataVersion) == MetadataVersion.Length);
System\Reflection\Metadata\Internal\GuidHeap.cs (1)
26
return this.Block.PeekGuid((handle.Index - 1) *
BlobUtilities
.SizeOfGuid);
System\Reflection\PortableExecutable\PEMemoryBlock.cs (2)
50
BlobUtilities
.ValidateRange(Length, start, length, nameof(length));
68
BlobUtilities
.ValidateRange(Length, start, length, nameof(length));