Craig's Utility Library  4.0 Beta
Utilities.DataTypes.ObservableList< T > Class Template Reference

Observable List class More...

Inheritance diagram for Utilities.DataTypes.ObservableList< T >:

Public Member Functions

 ObservableList ()
 Initializes a virtual instance of the ObservableList<T> class. More...
 
 ObservableList (int capacity)
 Initializes a virtual instance of the ObservableList<T> class. More...
 
 ObservableList (IEnumerable< T > collection)
 Initializes a virtual instance of the ObservableList<T> class. More...
 
virtual void Add (T item)
 Adds an object to the end of the T:System.Collections.Generic.List`1. More...
 
virtual void AddRange (IEnumerable< T > collection)
 Adds the range. More...
 
virtual void Clear ()
 Removes all elements from the T:System.Collections.Generic.List`1. More...
 
void ClearDelegates ()
 Clears the delegates from the list. More...
 
bool Contains (T item)
 Determines whether the T:System.Collections.Generic.ICollection`1 contains a specific value. More...
 
void CopyTo (T[] array, int arrayIndex)
 Copies to. More...
 
IEnumerator< T > GetEnumerator ()
 Returns an enumerator that iterates through the collection. More...
 
int IndexOf (T item)
 Determines the index of a specific item in the T:System.Collections.Generic.IList`1. More...
 
virtual void Insert (int index, T item)
 Inserts an element into the T:System.Collections.Generic.List`1 at the specified index. More...
 
virtual void InsertRange (int index, IEnumerable< T > collection)
 Inserts the range. More...
 
void NotifyObjectChanged (object itemChanged)
 Notifies the list that an item in the list has been modified. More...
 
virtual bool Remove (T item)
 Removes the first occurrence of a specific object from the T:System.Collections.Generic.List`1. More...
 
virtual int RemoveAll (Predicate< T > match)
 Removes all. More...
 
virtual void RemoveAt (int index)
 Removes the element at the specified index of the T:System.Collections.Generic.List`1. More...
 
virtual void RemoveRange (int index, int count)
 Removes a range of elements from the T:System.Collections.Generic.List`1. More...
 

Protected Member Functions

void NotifyCollectionChanged (NotifyCollectionChangedEventArgs args)
 Notifies the collection changed. More...
 
void NotifyPropertyChanged ([CallerMemberName]string propertyName="")
 Notifies the property changed. More...
 

Properties

NotifyCollectionChangedEventHandler CollectionChanged
 Occurs when the collection changes. More...
 
PropertyChangedEventHandler PropertyChanged
 Occurs when a property value changes. More...
 
int Count [get]
 Gets the number of elements contained in the T:System.Collections.Generic.ICollection`1. More...
 
bool IsReadOnly [get]
 Gets a value indicating whether the T:System.Collections.Generic.ICollection`1 is read-only. More...
 
this[int index] [get, set]
 Gets or sets the element at the specified index. More...
 

Detailed Description

Observable List class

Template Parameters
TObject type that the list holds

Definition at line 35 of file ObservableList.cs.

Constructor & Destructor Documentation

Initializes a virtual instance of the ObservableList<T> class.

Definition at line 40 of file ObservableList.cs.

Initializes a virtual instance of the ObservableList<T> class.

Parameters
capacityThe number of elements that the virtual list can initially store.

Definition at line 51 of file ObservableList.cs.

Utilities.DataTypes.ObservableList< T >.ObservableList ( IEnumerable< T >  collection)

Initializes a virtual instance of the ObservableList<T> class.

Parameters
collectionThe collection.

Definition at line 60 of file ObservableList.cs.

Member Function Documentation

virtual void Utilities.DataTypes.ObservableList< T >.Add ( item)
virtual

Adds an object to the end of the T:System.Collections.Generic.List`1.

Parameters
itemThe object to be added to the end of the T:System.Collections.Generic.List`1. The value can be null for reference types.

Definition at line 172 of file ObservableList.cs.

virtual void Utilities.DataTypes.ObservableList< T >.AddRange ( IEnumerable< T >  collection)
virtual

Adds the range.

Parameters
collectionThe collection.

Definition at line 183 of file ObservableList.cs.

virtual void Utilities.DataTypes.ObservableList< T >.Clear ( )
virtual

Removes all elements from the T:System.Collections.Generic.List`1.

Definition at line 193 of file ObservableList.cs.

void Utilities.DataTypes.ObservableList< T >.ClearDelegates ( )

Clears the delegates from the list.

Definition at line 203 of file ObservableList.cs.

bool Utilities.DataTypes.ObservableList< T >.Contains ( item)

Determines whether the T:System.Collections.Generic.ICollection`1 contains a specific value.

Parameters
itemThe object to locate in the T:System.Collections.Generic.ICollection`1.
Returns
true if item is found in the T:System.Collections.Generic.ICollection`1; otherwise, false.

Definition at line 220 of file ObservableList.cs.

void Utilities.DataTypes.ObservableList< T >.CopyTo ( T[]  array,
int  arrayIndex 
)

Copies to.

Parameters
arrayThe array.
arrayIndexIndex of the array.

Definition at line 230 of file ObservableList.cs.

IEnumerator<T> Utilities.DataTypes.ObservableList< T >.GetEnumerator ( )

Returns an enumerator that iterates through the collection.

Returns
A T:System.Collections.Generic.IEnumerator`1 that can be used to iterate through the collection.

Definition at line 242 of file ObservableList.cs.

int Utilities.DataTypes.ObservableList< T >.IndexOf ( item)

Determines the index of a specific item in the T:System.Collections.Generic.IList`1.

Parameters
itemThe object to locate in the T:System.Collections.Generic.IList`1.
Returns
The index of item if found in the list; otherwise, -1.

Definition at line 252 of file ObservableList.cs.

virtual void Utilities.DataTypes.ObservableList< T >.Insert ( int  index,
item 
)
virtual

Inserts an element into the T:System.Collections.Generic.List`1 at the specified index.

Parameters
indexThe zero-based index at which item should be inserted.
itemThe object to insert. The value can be null for reference types.

Definition at line 265 of file ObservableList.cs.

virtual void Utilities.DataTypes.ObservableList< T >.InsertRange ( int  index,
IEnumerable< T >  collection 
)
virtual

Inserts the range.

Parameters
indexThe index.
collectionThe collection.

Definition at line 277 of file ObservableList.cs.

void Utilities.DataTypes.ObservableList< T >.NotifyCollectionChanged ( NotifyCollectionChangedEventArgs  args)
protected

Notifies the collection changed.

Parameters
argsThe NotifyCollectionChangedEventArgs instance containing the event data.

Definition at line 368 of file ObservableList.cs.

void Utilities.DataTypes.ObservableList< T >.NotifyObjectChanged ( object  itemChanged)

Notifies the list that an item in the list has been modified.

Parameters
itemChangedThe item that was changed.

Definition at line 288 of file ObservableList.cs.

void Utilities.DataTypes.ObservableList< T >.NotifyPropertyChanged ( [CallerMemberName] string  propertyName = "")
protected

Notifies the property changed.

Parameters
propertyNameName of the property.

Definition at line 379 of file ObservableList.cs.

virtual bool Utilities.DataTypes.ObservableList< T >.Remove ( item)
virtual

Removes the first occurrence of a specific object from the T:System.Collections.Generic.List`1.

Parameters
itemThe object to remove from the T:System.Collections.Generic.List`1. The value can be null for reference types.
Returns
true if item is successfully removed; otherwise, false. This method also returns false if item was not found in the T:System.Collections.Generic.List`1.

Definition at line 306 of file ObservableList.cs.

virtual int Utilities.DataTypes.ObservableList< T >.RemoveAll ( Predicate< T >  match)
virtual

Removes all.

Parameters
matchThe match.
Returns

Definition at line 318 of file ObservableList.cs.

virtual void Utilities.DataTypes.ObservableList< T >.RemoveAt ( int  index)
virtual

Removes the element at the specified index of the T:System.Collections.Generic.List`1.

Parameters
indexThe zero-based index of the element to remove.

Definition at line 329 of file ObservableList.cs.

virtual void Utilities.DataTypes.ObservableList< T >.RemoveRange ( int  index,
int  count 
)
virtual

Removes a range of elements from the T:System.Collections.Generic.List`1.

Parameters
indexThe zero-based starting index of the range of elements to remove.
countThe number of elements to remove.

Definition at line 341 of file ObservableList.cs.

Property Documentation

NotifyCollectionChangedEventHandler Utilities.DataTypes.ObservableList< T >.CollectionChanged
addremove

Occurs when the collection changes.

Definition at line 89 of file ObservableList.cs.

Gets the number of elements contained in the T:System.Collections.Generic.ICollection`1.

Definition at line 127 of file ObservableList.cs.

bool Utilities.DataTypes.ObservableList< T >.IsReadOnly
get

Gets a value indicating whether the T:System.Collections.Generic.ICollection`1 is read-only.

Definition at line 136 of file ObservableList.cs.

PropertyChangedEventHandler Utilities.DataTypes.ObservableList< T >.PropertyChanged
addremove

Occurs when a property value changes.

Definition at line 108 of file ObservableList.cs.

T Utilities.DataTypes.ObservableList< T >.this[int index]
getset

Gets or sets the element at the specified index.

Parameters
indexThe index.
Returns

Definition at line 152 of file ObservableList.cs.


The documentation for this class was generated from the following file: