CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
System::Buffers::BuffersExtensions Class Reference

Provides extension-style helper methods for working with buffers. More...

#include <buffers_extensions.h>

Static Public Member Functions

template<typename T >
static void CopyTo (const ReadOnlySequence< T > &source, Span< T > destination)
 Copies the elements of the given ReadOnlySequence to the destination span. More...
 
template<typename T >
static SharedPtr< Array< T > > ToArray (const ReadOnlySequence< T > &sequence)
 Copies the elements of the given ReadOnlySequence to a newly allocated array. More...
 

Detailed Description

Provides extension-style helper methods for working with buffers.

Member Function Documentation

◆ CopyTo()

template<typename T >
static void System::Buffers::BuffersExtensions::CopyTo ( const ReadOnlySequence< T > &  source,
Span< T >  destination 
)
inlinestatic

Copies the elements of the given ReadOnlySequence to the destination span.

Template Parameters
TThe type of elements.
Parameters
sourceThe sequence whose elements are copied.
destinationThe destination span to fill.

◆ ToArray()

template<typename T >
static SharedPtr< Array< T > > System::Buffers::BuffersExtensions::ToArray ( const ReadOnlySequence< T > &  sequence)
inlinestatic

Copies the elements of the given ReadOnlySequence to a newly allocated array.

Template Parameters
TThe type of elements.
Parameters
sequenceThe sequence whose elements are copied.
Returns
A new array containing a copy of the elements in the sequence.