Exemplo n.º 1
0
        /// <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);
        }
Exemplo n.º 2
0
        /// <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);
        }
Exemplo n.º 3
0
 /// <inheritdoc cref="UnmanagedSpan{T}.CopyTo(UnmanagedSpan{T})" />
 public void CopyTo(UnmanagedSpan <T> destination) => _span.CopyTo(destination);
Exemplo n.º 4
0
 /// <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;
 }
Exemplo n.º 5
0
 public DebugView(UnmanagedSpan <T> span)
 {
     _span = span;
 }