9 references to Utf8Bom
System.Text.Json (9)
System\Text\Json\Document\JsonDocument.Parse.cs (4)
766
ReadOnlySpan<byte> utf8Bom = JsonConstants.
Utf8Bom
;
851
int utf8BomLength = JsonConstants.
Utf8Bom
.Length;
871
Debug.Assert(rented.Length >= JsonConstants.
Utf8Bom
.Length);
888
JsonConstants.
Utf8Bom
.SequenceEqual(rented.AsSpan(0, utf8BomLength)))
System\Text\Json\Serialization\ReadBufferState.cs (5)
46
_buffer = ArrayPool<byte>.Shared.Rent(Math.Max(initialBufferSize, JsonConstants.
Utf8Bom
.Length));
175
Debug.Assert(_buffer.Length >= JsonConstants.
Utf8Bom
.Length);
176
if (_buffer.AsSpan(0, _count).StartsWith(JsonConstants.
Utf8Bom
))
178
_offset = (byte)JsonConstants.
Utf8Bom
.Length;
179
_count -= JsonConstants.
Utf8Bom
.Length;