21 references to GetBytesMode
System.Runtime.Numerics (21)
System\Numerics\BigInteger.cs (21)
1260return TryGetBytes(GetBytesMode.AllocateArray, default, isUnsigned, isBigEndian, ref ignored)!; 1277if (TryGetBytes(GetBytesMode.Span, destination, isUnsigned, isBigEndian, ref bytesWritten) == null) 1288return TryGetBytes(GetBytesMode.Span, destination, isUnsigned, isBigEndian, ref bytesWritten) != null; 1298TryGetBytes(GetBytesMode.Count, default(Span<byte>), isUnsigned, IsBigEndian, ref count); 1302/// <summary>Mode used to enable sharing <see cref="TryGetBytes(GetBytesMode, Span{byte}, bool, bool, ref int)"/> for multiple purposes.</summary> 1312/// <param name="destination">The destination span, if mode is <see cref="GetBytesMode.Span"/>.</param> 1316/// If <paramref name="mode"/>==<see cref="GetBytesMode.AllocateArray"/>, ignored. 1317/// If <paramref name="mode"/>==<see cref="GetBytesMode.Count"/>, the number of bytes that would be written. 1318/// If <paramref name="mode"/>==<see cref="GetBytesMode.Span"/>, the number of bytes written to the span or that would be written if it were long enough. 1321/// If <paramref name="mode"/>==<see cref="GetBytesMode.AllocateArray"/>, the result array. 1322/// If <paramref name="mode"/>==<see cref="GetBytesMode.Count"/>, null. 1323/// If <paramref name="mode"/>==<see cref="GetBytesMode.Span"/>, non-null if the span was long enough, null if there wasn't enough room. 1326private byte[]? TryGetBytes(GetBytesMode mode, Span<byte> destination, bool isUnsigned, bool isBigEndian, ref int bytesWritten) 1328Debug.Assert(mode == GetBytesMode.AllocateArray || mode == GetBytesMode.Count || mode == GetBytesMode.Span, $"Unexpected mode {mode}."); 1329Debug.Assert(mode == GetBytesMode.Span || destination.IsEmpty, $"If we're not in span mode, we shouldn't have been passed a destination."); 1336case GetBytesMode.AllocateArray: 1338case GetBytesMode.Count: 1432case GetBytesMode.AllocateArray: 1435case GetBytesMode.Count: