ConcurrentList<T>

public class ConcurrentList<T> : IEnumerable<T>
Provides very basic concurrent storage. This class is not high-performance.
T

Properties

Count

#
Gets the number of items currently stored.
public int Count { get; }

Methods

Add

#
Add an item to this collection.
public void Add(
T
item
Item to add.
)

Apply<TOut>

#
Apply a delegate to the internal list. I hope you know how to write threadsafe code before you use this method.
public TOut Apply<TOut>(
Func<List<T>, TOut>
function
Function to apply.
)

Apply

#
Apply a delegate to the internal list. I hope you know how to write threadsafe code before you use this method.
public void Apply(
action
Action to apply.
)

Contains

#
Gets whether this list contains the given item.
public bool Contains(
T
item
Item to search for.
)
True if the item exists within the list, false if otherwise.

GetEnumerator

#
Enumerate over all items in the concurrent list. This enumerator operates on a copy of the internal data and thus will not reflect changes made to the collection, but also won't throw a synchronisation exception. The enumerator itself does not run from a locked section.
public IEnumerator<T> GetEnumerator()

Remove

#
Remove an item from this collection.
public bool Remove(
T
item
Item to remove.
)
True if item was found and removed, false if otherwise.
Explicit

IEnumerable.GetEnumerator

#
IEnumerator IEnumerable.GetEnumerator()