/// <summary>Copies the items in the array to a given destination.</summary> /// <param name="destination">The destination span where the items should be copied.</param> /// <exception cref="ArgumentOutOfRangeException"><see cref="Length" /> is greater than <paramref name="destination" />.</exception> public void CopyTo(UnmanagedSpan <T> destination) { var items = _items; var length = _length; ThrowIfNotInInsertBounds(length, destination.Length, nameof(Length), nameof(destination)); CopyArrayUnsafe <T>(destination.GetPointerUnsafe(0), items, length); }
/// <summary>Copies the items in the array to a given destination.</summary> /// <param name="destination">The destination span where the items should be copied.</param> /// <exception cref="ArgumentOutOfRangeException"><see cref="Length" /> is greater than <paramref name="destination" />.</exception> public void CopyTo(UnmanagedSpan <T> destination) { AssertNotNull(this); var items = &_data->Item; var length = _data->Length; ThrowIfNotInInsertBounds(length, destination.Length, nameof(Length), nameof(destination)); CopyArrayUnsafe <T>(destination.GetPointerUnsafe(0), items, length); }
/// <inheritdoc cref="UnmanagedSpan{T}.CopyTo(UnmanagedSpan{T})" /> public void CopyTo(UnmanagedSpan <T> destination) => _span.CopyTo(destination);
/// <summary>Initializes a new instance of the <see cref="UnmanagedReadOnlySpan{T}" /> struct.</summary> /// <param name="span">The underlying span for the readonly span.</param> public UnmanagedReadOnlySpan(UnmanagedSpan <T> span) { _span = span; }
public DebugView(UnmanagedSpan <T> span) { _span = span; }