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)
41public int Length => _bytes.Length; 47public bool IsEmpty => _bytes.IsEmpty; 419=> new BinaryData(_bytes, mediaType); 436ReadOnlySpan<byte> span = _bytes.Span; 453public Stream ToStream() => new ReadOnlyMemoryStream(_bytes); 459public ReadOnlyMemory<byte> ToMemory() => _bytes; 465public byte[] ToArray() => _bytes.ToArray(); 493ReadOnlySpan<byte> span = _bytes.Span; 506public static implicit operator ReadOnlyMemory<byte>(BinaryData? data) => data?._bytes ?? default; 518return data._bytes.Span;