3 writes to _bytes
System.Memory.Data (3)
System\BinaryData.cs (3)
62
_bytes
= data ?? throw new ArgumentNullException(nameof(data));
120
_bytes
= data;
147
_bytes
= Encoding.UTF8.GetBytes(data);
10 references to _bytes
System.Memory.Data (10)
System\BinaryData.cs (10)
41
public int Length =>
_bytes
.Length;
47
public bool IsEmpty =>
_bytes
.IsEmpty;
419
=> new BinaryData(
_bytes
, mediaType);
436
ReadOnlySpan<byte> span =
_bytes
.Span;
453
public Stream ToStream() => new ReadOnlyMemoryStream(
_bytes
);
459
public ReadOnlyMemory<byte> ToMemory() =>
_bytes
;
465
public byte[] ToArray() =>
_bytes
.ToArray();
493
ReadOnlySpan<byte> span =
_bytes
.Span;
506
public static implicit operator ReadOnlyMemory<byte>(BinaryData? data) => data?.
_bytes
?? default;
518
return data.
_bytes
.Span;