Table of Contents

Class NetworkLinkedList<T>

Namespace
Netick
Assembly
Netick.dll

A networked linked list collection. This is an ordered list meaning that the elements insertion order is maintained when iterating through the collection.

public sealed class NetworkLinkedList<T> : NetworkLinkedList, INetworkCollection, IEnumerable<T>, IEnumerable where T : unmanaged

Type Parameters

T
Inheritance
NetworkLinkedList<T>
Implements
Inherited Members

Constructors

NetworkLinkedList(int)

public NetworkLinkedList(int capacity)

Parameters

capacity int

Properties

Count

Gets the number of items contained in the linked list.

public int Count { get; }

Property Value

int

Head

Gets the first node in the linked list.

public NetworkLinkedListNode<T> Head { get; }

Property Value

NetworkLinkedListNode<T>

Nodes

Gets an enumerable collection of all nodes in the linked list.

public IEnumerable<NetworkLinkedListNode<T>> Nodes { get; }

Property Value

IEnumerable<NetworkLinkedListNode<T>>

Tail

Gets the last node in the linked list.

public NetworkLinkedListNode<T> Tail { get; }

Property Value

NetworkLinkedListNode<T>

Methods

Add(T)

Adds an item to the end of the linked list.

public bool Add(T item)

Parameters

item T

The item to add.

Returns

bool

True if the item was added; otherwise, false.

AddAfter(NetworkLinkedListNode<T>, T, out NetworkLinkedListNode<T>)

Adds an item after the specified node in the linked list.

public bool AddAfter(NetworkLinkedListNode<T> afterThisNode, T item, out NetworkLinkedListNode<T> addedNode)

Parameters

afterThisNode NetworkLinkedListNode<T>

The node after which to insert the new item.

item T

The item to add.

addedNode NetworkLinkedListNode<T>

The node that was added.

Returns

bool

True if the item was added; otherwise, false.

AddBefore(NetworkLinkedListNode<T>, T, out NetworkLinkedListNode<T>)

Adds an item before the specified node in the linked list.

public bool AddBefore(NetworkLinkedListNode<T> beforeThisNode, T item, out NetworkLinkedListNode<T> addedNode)

Parameters

beforeThisNode NetworkLinkedListNode<T>

The node before which to insert the new item.

item T

The item to add.

addedNode NetworkLinkedListNode<T>

The node that was added.

Returns

bool

True if the item was added; otherwise, false.

AddFirst(T, out NetworkLinkedListNode<T>)

Adds an item as the first node in the linked list.

public bool AddFirst(T item, out NetworkLinkedListNode<T> addedNode)

Parameters

item T

The item to add.

addedNode NetworkLinkedListNode<T>

The node that was added.

Returns

bool

True if the item was added; otherwise, false.

AddLast(T, out NetworkLinkedListNode<T>)

Adds an item as the last node in the linked list.

public bool AddLast(T item, out NetworkLinkedListNode<T> addedNode)

Parameters

item T

The item to add.

addedNode NetworkLinkedListNode<T>

The node that was added.

Returns

bool

True if the item was added; otherwise, false.

Clear()

Removes all items from the linked list.

public void Clear()

GetEnumerator()

public NetworkLinkedList<T>.Enumerator GetEnumerator()

Returns

NetworkLinkedList<T>.Enumerator

GetNode(int)

public NetworkLinkedListNode<T> GetNode(int index)

Parameters

index int

Returns

NetworkLinkedListNode<T>

InternalInit(INetickNetworkScript, int*, int, int)

public override void InternalInit(INetickNetworkScript beh, int* state, int elementSizeWords, int flags)

Parameters

beh INetickNetworkScript
state int*
elementSizeWords int
flags int

InternalReset()

public override void InternalReset()

Remove(NetworkLinkedListNode<T>)

Removes the specified node from the linked list.

public bool Remove(NetworkLinkedListNode<T> node)

Parameters

node NetworkLinkedListNode<T>

The node to remove.

Returns

bool

True if the node was removed; otherwise, false.

Remove(T)

Removes the first occurrence of the specified item from the linked list.

public bool Remove(T item)

Parameters

item T

The item to remove.

Returns

bool

True if the item was removed; otherwise, false.