Share via


PooledSpan<T> Constructors

Definition

Overloads

PooledSpan<T>(IEnumerable<T>, Boolean, ArrayPool<T>)

Request a pooled array that copies elements from the provided IEnumerable<T>

PooledSpan<T>(Int32, Boolean, ArrayPool<T>)

Request a pooled array that is of the specified size.

PooledSpan<T>(IEnumerable<T>, Boolean, ArrayPool<T>)

Request a pooled array that copies elements from the provided IEnumerable<T>

public PooledSpan (System.Collections.Generic.IEnumerable<T> original, bool clearWhenDisposed = false, System.Buffers.ArrayPool<T>? pool = default);
new Microsoft.VisualStudio.Utilities.PooledSpan<'T> : seq<'T> * bool * System.Buffers.ArrayPool<'T> -> Microsoft.VisualStudio.Utilities.PooledSpan<'T>
Public Sub New (original As IEnumerable(Of T), Optional clearWhenDisposed As Boolean = false, Optional pool As ArrayPool(Of T) = Nothing)

Parameters

original
IEnumerable<T>

The enumerable to copy elements from.

clearWhenDisposed
Boolean

If the elements in the array should be set to their default value once the pooled array is returned.

pool
ArrayPool<T>

The pool to request the array from.

Applies to

PooledSpan<T>(Int32, Boolean, ArrayPool<T>)

Request a pooled array that is of the specified size.

public PooledSpan (int minimumSize, bool clearWhenDisposed = false, System.Buffers.ArrayPool<T>? pool = default);
new Microsoft.VisualStudio.Utilities.PooledSpan<'T> : int * bool * System.Buffers.ArrayPool<'T> -> Microsoft.VisualStudio.Utilities.PooledSpan<'T>
Public Sub New (minimumSize As Integer, Optional clearWhenDisposed As Boolean = false, Optional pool As ArrayPool(Of T) = Nothing)

Parameters

minimumSize
Int32

The required size of the array.

clearWhenDisposed
Boolean

If the elements in the array should be set to their default value once the pooled array is returned.

pool
ArrayPool<T>

The pool to request the array from.

Applies to