You are here: Start » AVL.NET » SafeList<T> Class

SafeList<T> Class

Namespace:AvlNet
Assembly:AVL.NET.TS.dll

Represents a strongly typed list of objects that can be accessed by index. The list is responsible for disposing it's elements.

Constructors

 ConstructorDescription
SafeList<T>()Creates an empty SafeList<T> collection.
SafeList<T>(IEnumerable<T>)Creates the SafeList<T> populated with specified collection. Takes responsibility for disposing all specified elements.

Properties

 NameTypeDescription
CountSystem.Int32Gets the number of elements contained in the SafeList<T>.
IsDisposedSystem.BooleanGets if the SafeList<T> object has been disposed.
ItemTGets or sets the element at the specified index.

Methods

 NameDescription
AddRange(IEnumerable<T>)Adds a range of elements to the end of the SafeList<T>. Takes the responsibility for disposing the specific objects.
Add(T)Adds an element to the end of the SafeList<T> and takes the responsibility for disposing it.
Clear()Removes and disposes all elements from the SafeList<T>.
Contains(T)Checks if the SafeList<T> contains the specific item.
CopyTo(T[], int)Copies the SafeList<T> or a portion of it to an array. The copy is shallow, i.e. copies only the references.
Dispose()Disposes underlying unmanaged resources. See MSDN documentation for IDisposable interface for more info.
Equals(object)Inherited from System.Object
GetEnumerator()Returns an enumerator that iterates through the SafeList<T>.
GetHashCode()Inherited from System.Object
GetType()Inherited from System.Object
IndexOf(T)Returns the zero-based index of the first occurrence of a value in the entire SafeList<T>.
Insert(int, T)Inserts an element into the SafeList<T> at the specific index and takes the responsibility for disposing it.
Release()Removes without disposing all the elements of the SafeList<T>.
Release(int)Removes without disposing the element at the specified index of the SafeList<T>.
RemoveAt(int)Removes and disposes the element at the specified index of the SafeList<T>
Remove(T)Removes and disposes the first occurrence of the specific object from the SafeList<T>
ToString()Inherited from System.Object

Remarks

See also