Table of Contents

Class RefList<T>

Namespace
ReFuel.Collections
Assembly
ReFuel.Common.dll

A list which returns its internal reference.

public class RefList<T> : IRefReadonlyList<T>, IReadOnlyList<T>, IReadOnlyCollection<T>, IRefEnumerable<T>, IEnumerable<T>, IEnumerable

Type Parameters

T

The item type.

Inheritance
RefList<T>
Implements
Inherited Members

Constructors

RefList()

public RefList()

RefList(IEnumerable<T>)

public RefList(IEnumerable<T> collection)

Parameters

collection IEnumerable<T>

Properties

Capacity

public int Capacity { get; set; }

Property Value

int

Count

Gets the number of elements in the collection.

public int Count { get; }

Property Value

int

The number of elements in the collection.

IsReadOnly

public bool IsReadOnly { get; }

Property Value

bool

this[int]

public ref T this[int index] { get; }

Parameters

index int

Property Value

T

Methods

Add(T)

public int Add(T item)

Parameters

item T

Returns

int

AsSpan()

public Span<T> AsSpan()

Returns

Span<T>

AsSpan(Index)

public Span<T> AsSpan(Index index)

Parameters

index Index

Returns

Span<T>

AsSpan(int)

public Span<T> AsSpan(int start)

Parameters

start int

Returns

Span<T>

AsSpan(int, int)

public Span<T> AsSpan(int start, int count)

Parameters

start int
count int

Returns

Span<T>

Clear()

public void Clear()

Contains(T)

public bool Contains(T item)

Parameters

item T

Returns

bool

CopyTo(T[], int)

public void CopyTo(T[] destination, int arrayIndex)

Parameters

destination T[]
arrayIndex int

GetEnumerator()

Returns an enumerator that iterates through the collection.

public IEnumerator<T> GetEnumerator()

Returns

IEnumerator<T>

An enumerator that can be used to iterate through the collection.

IndexOf(T)

public int IndexOf(T item)

Parameters

item T

Returns

int

Insert(int, T)

public void Insert(int index, T item)

Parameters

index int
item T

Remove(T)

public bool Remove(T item)

Parameters

item T

Returns

bool

RemoveAt(int)

public void RemoveAt(int index)

Parameters

index int

Operators

implicit operator ReadOnlySpan<T>(RefList<T>)

public static implicit operator ReadOnlySpan<T>(RefList<T> list)

Parameters

list RefList<T>

Returns

ReadOnlySpan<T>

implicit operator Span<T>(RefList<T>)

public static implicit operator Span<T>(RefList<T> list)

Parameters

list RefList<T>

Returns

Span<T>