Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ CopyTo< T >()

static void System.Buffers.BuffersExtensions.CopyTo< T > ( this in ReadOnlySequence< T > source,
Span< T > destination )
inlinestatic

Definition at line 44 of file BuffersExtensions.cs.

45 {
46 if (source.IsSingleSegment)
47 {
48 ReadOnlySpan<T> span = source.First.Span;
49 if (span.Length > destination.Length)
50 {
51 System.ThrowHelper.ThrowArgumentOutOfRangeException(System.ExceptionArgument.destination);
52 }
53 span.CopyTo(destination);
54 }
55 else
56 {
57 CopyToMultiSegment(in source, destination);
58 }
59 }
static void ThrowArgumentOutOfRangeException(System.ExceptionArgument argument)

References System.ReadOnlySpan< T >.CopyTo(), System.destination, System.ReadOnlySpan< T >.Length, System.source, and System.ThrowHelper.ThrowArgumentOutOfRangeException().