Show / Hide Table of Contents

Class ArrayBuffer<T>

An array rented from the ArrayPool<T>.

Inheritance
Object
ArrayBuffer<T>
Namespace: NanoByte.Common.Collections
Assembly: NanoByte.Common.dll
Syntax
public sealed class ArrayBuffer<T> : Object
Type Parameters
Name Description
T

Constructors

ArrayBuffer(Int32)

An array rented from the ArrayPool<T>.

Declaration
public ArrayBuffer(int length)
Parameters
Type Name Description
Int32 length

The desired array length.

Properties

Array

The array. The length may be equal to or greater than the requested Length.

Declaration
public T[] Array { get; }
Property Value
Type Description
T[]
Exceptions
Type Condition
ObjectDisposedException

Dispose() has been called.

Length

The requested length of the array.

Declaration
public int Length { get; }
Property Value
Type Description
Int32

Segment

A view of the array with exactly the requested Length.

Declaration
public ArraySegment<T> Segment { get; }
Property Value
Type Description
ArraySegment<T>
Exceptions
Type Condition
ObjectDisposedException

Dispose() has been called.

Span

A view of the array with exactly the requested Length.

Declaration
public Span<T> Span { get; }
Property Value
Type Description
Span<T>
Exceptions
Type Condition
ObjectDisposedException

Dispose() has been called.

Methods

Dispose()

Returns the array to the ArrayPool<T>.

Declaration
public void Dispose()

Extension Methods

UpdateUtils.To<TIn, TOut>(TIn, Func<TIn, TOut>)
JsonStorage.SaveJson<T>(T, Stream)
JsonStorage.SaveJson<T>(T, String)
JsonStorage.ToJsonString<T>(T)
JsonStorage.ReparseAsJson<T>(Object)
JsonStorage.ReparseAsJson<T>(Object, T)
XmlStorage.SaveXml(Object, Stream, String)
XmlStorage.SaveXml<T>(T, String, String)
XmlStorage.ToXmlString(Object, String)
ConversionUtils.ConvertToString<TType>(TType)
In This Article
Back to top Copyright Bastian Eicher