CSLA.NET 6.0.0
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
Csla.LinqObservableCollection< T > Class Template Reference

Synchronized view over a source list, filtered, sorted and ordered based on a query result. More...

Inheritance diagram for Csla.LinqObservableCollection< T >:

Public Member Functions

 LinqObservableCollection (System.Collections.ObjectModel.ObservableCollection< T > source, IEnumerable< T > queryResult)
 
 LinqObservableCollection (System.Collections.ObjectModel.ObservableCollection< T > source, List< T > queryResult)
 Creates a new instance of the observable view. More...
 
int IndexOf (T item)
 Gets the positional index of the item. More...
 
void Insert (int index, T item)
 Inserts item into specified position in list. More...
 
void RemoveAt (int index)
 Removes item at specified index. More...
 
void Add (T item)
 Adds an item to the end of the list. More...
 
void Clear ()
 Clears the list. More...
 
bool Contains (T item)
 Gets a value indicating whether the list contains the specified item. More...
 
void CopyTo (T[] array, int arrayIndex)
 Copies the contents of the list to an array. More...
 
bool Remove (T item)
 Removes specified item from the list. More...
 
IEnumerator< T > GetEnumerator ()
 Gets an enumerator for the list. More...
 
int Add (object value)
 Adds an item to the end of the list. More...
 
bool Contains (object value)
 Gets a value indicating whether the list contains the specified item. More...
 
int IndexOf (object value)
 Gets the positional index of the item. More...
 
void Insert (int index, object value)
 Inserts item into specified position in list. More...
 
void Remove (object value)
 Removes specified item from the list. More...
 
void CopyTo (Array array, int index)
 Copies the contents of the list to an array. More...
 

Protected Member Functions

virtual void OnCollectionChanged (NotifyCollectionChangedEventArgs e)
 Raises the CollectionChanged event. More...
 

Properties

IList< T > Source [get]
 Gets the source list (usually a BusinessListBase) object that contains/manages all data items. More...
 
List< T > QueryResult [get]
 Gets the query result object used to filter the view. More...
 
this[int index] [getset]
 Gets or sets the value at the specified index. More...
 
int Count [get]
 Gets the number of items in the list. More...
 
bool IsReadOnly [get]
 Gets a value indicating whether the source list is read-only. More...
 
bool IsFixedSize [get]
 Gets a value indicating whether the source list has a fixed size. More...
 
bool IsSynchronized [get]
 Gets a value indicating whether the source list is synchronized. More...
 
object SyncRoot [get]
 Gets the SyncRoot from the source list. More...
 

Events

System.Collections.Specialized.NotifyCollectionChangedEventHandler CollectionChanged
 Event raised when the underlying source list is changed. More...
 

Detailed Description

Synchronized view over a source list, filtered, sorted and ordered based on a query result.

Template Parameters
TType of objects contained in the list/collection.

Definition at line 23 of file LinqObservableCollection.cs.

Constructor & Destructor Documentation

◆ LinqObservableCollection() [1/2]

Csla.LinqObservableCollection< T >.LinqObservableCollection ( System.Collections.ObjectModel.ObservableCollection< T >  source,
IEnumerable< T >  queryResult 
)

Creates a new instance of the observable view.

Parameters
sourceSource list containing/managing all items.
queryResultFiltered query result over source list.

Definition at line 40 of file LinqObservableCollection.cs.

◆ LinqObservableCollection() [2/2]

Csla.LinqObservableCollection< T >.LinqObservableCollection ( System.Collections.ObjectModel.ObservableCollection< T >  source,
List< T >  queryResult 
)

Creates a new instance of the observable view.

Parameters
sourceSource list containing/managing all items.
queryResultFiltered query result over source list.

Definition at line 50 of file LinqObservableCollection.cs.

Member Function Documentation

◆ Add() [1/2]

int Csla.LinqObservableCollection< T >.Add ( object  value)

Adds an item to the end of the list.

Parameters
valueItem to add.

Definition at line 283 of file LinqObservableCollection.cs.

◆ Add() [2/2]

void Csla.LinqObservableCollection< T >.Add ( item)

Adds an item to the end of the list.

Parameters
itemItem to add.

Definition at line 186 of file LinqObservableCollection.cs.

◆ Clear()

void Csla.LinqObservableCollection< T >.Clear ( )

Clears the list.

Items in the LinqObservableCollection are cleared, and are also removed from the source list. Other items in the source list are unaffected.

Definition at line 199 of file LinqObservableCollection.cs.

◆ Contains() [1/2]

bool Csla.LinqObservableCollection< T >.Contains ( object  value)

Gets a value indicating whether the list contains the specified item.

Parameters
valueItem to find.

Definition at line 293 of file LinqObservableCollection.cs.

◆ Contains() [2/2]

bool Csla.LinqObservableCollection< T >.Contains ( item)

Gets a value indicating whether the list contains the specified item.

Parameters
itemItem to find.

Definition at line 215 of file LinqObservableCollection.cs.

◆ CopyTo() [1/2]

void Csla.LinqObservableCollection< T >.CopyTo ( Array  array,
int  index 
)

Copies the contents of the list to an array.

Parameters
arrayTarget array.
indexIndex in array where copying begins.

Definition at line 352 of file LinqObservableCollection.cs.

◆ CopyTo() [2/2]

void Csla.LinqObservableCollection< T >.CopyTo ( T[]  array,
int  arrayIndex 
)

Copies the contents of the list to an array.

Parameters
arrayTarget array.
arrayIndexIndex in array where copying begins.

Definition at line 225 of file LinqObservableCollection.cs.

◆ GetEnumerator()

IEnumerator< T > Csla.LinqObservableCollection< T >.GetEnumerator ( )

Gets an enumerator for the list.

Definition at line 266 of file LinqObservableCollection.cs.

◆ IndexOf() [1/2]

int Csla.LinqObservableCollection< T >.IndexOf ( object  value)

Gets the positional index of the item.

Parameters
valueItem to find.

Definition at line 302 of file LinqObservableCollection.cs.

◆ IndexOf() [2/2]

int Csla.LinqObservableCollection< T >.IndexOf ( item)

Gets the positional index of the item.

Parameters
itemItem to find.

Definition at line 140 of file LinqObservableCollection.cs.

◆ Insert() [1/2]

void Csla.LinqObservableCollection< T >.Insert ( int  index,
object  value 
)

Inserts item into specified position in list.

Parameters
indexLocation to insert item.
valueItem to insert.

Definition at line 312 of file LinqObservableCollection.cs.

◆ Insert() [2/2]

void Csla.LinqObservableCollection< T >.Insert ( int  index,
item 
)

Inserts item into specified position in list.

Parameters
indexLocation to insert item.
itemItem to insert.

Definition at line 150 of file LinqObservableCollection.cs.

◆ OnCollectionChanged()

virtual void Csla.LinqObservableCollection< T >.OnCollectionChanged ( NotifyCollectionChangedEventArgs  e)
protectedvirtual

Raises the CollectionChanged event.

Parameters
eEventArgs for event.

Definition at line 111 of file LinqObservableCollection.cs.

◆ Remove() [1/2]

void Csla.LinqObservableCollection< T >.Remove ( object  value)

Removes specified item from the list.

Parameters
valueItem to remove.

Definition at line 330 of file LinqObservableCollection.cs.

◆ Remove() [2/2]

bool Csla.LinqObservableCollection< T >.Remove ( item)

Removes specified item from the list.

Parameters
itemItem to remove.

Definition at line 258 of file LinqObservableCollection.cs.

◆ RemoveAt()

void Csla.LinqObservableCollection< T >.RemoveAt ( int  index)

Removes item at specified index.

Parameters
indexIndex of item to remove.

Definition at line 159 of file LinqObservableCollection.cs.

Property Documentation

◆ Count

int Csla.LinqObservableCollection< T >.Count
get

Gets the number of items in the list.

Definition at line 233 of file LinqObservableCollection.cs.

◆ IsFixedSize

bool Csla.LinqObservableCollection< T >.IsFixedSize
get

Gets a value indicating whether the source list has a fixed size.

Definition at line 321 of file LinqObservableCollection.cs.

◆ IsReadOnly

bool Csla.LinqObservableCollection< T >.IsReadOnly
get

Gets a value indicating whether the source list is read-only.

Definition at line 242 of file LinqObservableCollection.cs.

◆ IsSynchronized

bool Csla.LinqObservableCollection< T >.IsSynchronized
get

Gets a value indicating whether the source list is synchronized.

Definition at line 361 of file LinqObservableCollection.cs.

◆ QueryResult

List<T> Csla.LinqObservableCollection< T >.QueryResult
get

Gets the query result object used to filter the view.

Definition at line 131 of file LinqObservableCollection.cs.

◆ Source

IList<T> Csla.LinqObservableCollection< T >.Source
get

Gets the source list (usually a BusinessListBase) object that contains/manages all data items.

Definition at line 122 of file LinqObservableCollection.cs.

◆ SyncRoot

object Csla.LinqObservableCollection< T >.SyncRoot
get

Gets the SyncRoot from the source list.

Definition at line 369 of file LinqObservableCollection.cs.

◆ this[int index]

T Csla.LinqObservableCollection< T >.this[int index]
getset

Gets or sets the value at the specified index.

Parameters
indexIndex location.

Definition at line 169 of file LinqObservableCollection.cs.

Event Documentation

◆ CollectionChanged

System.Collections.Specialized.NotifyCollectionChangedEventHandler Csla.LinqObservableCollection< T >.CollectionChanged

Event raised when the underlying source list is changed.

Definition at line 29 of file LinqObservableCollection.cs.