Class ObservableListWrap<T>
Wraps a generic list to provide notifications when the collection's content changes.
Inherited Members
Namespace: TheXDS.MCART.Types
Assembly: MCART.Mvvm.dll
Syntax
public class ObservableListWrap<T> : ObservableWrap<T, IList<T>>, INotifyPropertyChangeBase, IRefreshable, INotifyPropertyChanged, INotifyCollectionChanged, IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable
Type Parameters
| Name | Description |
|---|---|
| T | Type of elements in the list. |
Constructors
| Edit this page View SourceObservableListWrap()
Initializes a new instance of the ObservableListWrap<T> class.
Declaration
public ObservableListWrap()
ObservableListWrap(IList<T>)
Initializes a new instance of the ObservableListWrap<T> class.
Declaration
public ObservableListWrap(IList<T> collection)
Parameters
| Type | Name | Description |
|---|---|---|
| IList<T> | collection | Collection to use as the underlying list. |
Properties
| Edit this page View Sourcethis[int]
Provides indexed access to the contents of this ObservableListWrap<T>.
Declaration
public T this[int index] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | Index of the element to get or set. |
Property Value
| Type | Description |
|---|---|
| T | The element at the specified index in the collection. |
Methods
| Edit this page View SourceContains(T)
Determines whether the underlying sequence contains the specified item.
Declaration
public override bool Contains(T item)
Parameters
| Type | Name | Description |
|---|---|---|
| T | item | Item to locate in the sequence. |
Returns
| Type | Description |
|---|---|
| bool | true if the sequence contains the specified item; otherwise false. |
Overrides
| Edit this page View SourceIndexOf(T)
Returns the index of a specific item in this ObservableListWrap<T>.
Declaration
public int IndexOf(T item)
Parameters
| Type | Name | Description |
|---|---|---|
| T | item | Item whose index to get. |
Returns
| Type | Description |
|---|---|
| int | The index of the specified item. |
Insert(int, T)
Inserts an item into this ObservableListWrap<T> at the specified index.
Declaration
public void Insert(int index, T item)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | Position at which to insert the new item. |
| T | item | Item to insert at the specified index. |
RemoveAt(int)
Removes the item at the specified index from this ObservableListWrap<T>.
Declaration
public void RemoveAt(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | Index of the item to remove. |