CSLA .NET 10.0.0
A home for your business logic
Loading...
Searching...
No Matches
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)
 Creates a new instance of the observable view.
 LinqObservableCollection (System.Collections.ObjectModel.ObservableCollection< T > source, List< T > queryResult)
 Creates a new instance of the observable view.
int IndexOf (T item)
 Gets the positional index of the item.
void Insert (int index, T item)
 Inserts item into specified position in list.
void RemoveAt (int index)
 Removes item at specified index.
void Add (T item)
 Adds an item to the end of the list.
void Clear ()
 Clears the list.
bool Contains (T item)
 Gets a value indicating whether the list contains the specified item.
void CopyTo (T[] array, int arrayIndex)
 Copies the contents of the list to an array.
bool Remove (T item)
 Removes specified item from the list.
IEnumerator< T > GetEnumerator ()
 Gets an enumerator for the list.
int Add (object? value)
 Adds an item to the end of the list.
bool Contains (object? value)
 Gets a value indicating whether the list contains the specified item.
int IndexOf (object? value)
 Gets the positional index of the item.
void Insert (int index, object? value)
 Inserts item into specified position in list.
void Remove (object? value)
 Removes specified item from the list.
void CopyTo (Array array, int index)
 Copies the contents of the list to an array.

Protected Member Functions

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

Properties

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

Events

NotifyCollectionChangedEventHandler? CollectionChanged
 Event raised when the underlying source list is changed.

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.
Type Constraints
T :notnull 

Member Function Documentation

◆ Add() [1/2]

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

Adds an item to the end of the list.

Parameters
valueItem to add.
Exceptions
ArgumentNullExceptionvalue is null.

◆ Add() [2/2]

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

Adds an item to the end of the list.

Parameters
itemItem to add.
Exceptions
ArgumentNullExceptionitem is null.

◆ Clear()

void Csla.LinqObservableCollection< T >.Clear ( )
inline

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.

◆ Contains() [1/2]

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

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

Parameters
valueItem to find.
Exceptions
ArgumentNullExceptionvalue is null.

◆ Contains() [2/2]

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

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

Parameters
itemItem to find.
Exceptions
ArgumentNullExceptionitem is null.

◆ CopyTo() [1/2]

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

Copies the contents of the list to an array.

Parameters
arrayTarget array.
indexIndex in array where copying begins.
Exceptions
ArgumentNullExceptionarray is null.

◆ CopyTo() [2/2]

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

Copies the contents of the list to an array.

Parameters
arrayTarget array.
arrayIndexIndex in array where copying begins.
Exceptions
ArgumentNullExceptionarray is null.

◆ GetEnumerator()

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

Gets an enumerator for the list.

◆ IndexOf() [1/2]

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

Gets the positional index of the item.

Parameters
valueItem to find.
Exceptions
ArgumentNullExceptionvalue is null.

◆ IndexOf() [2/2]

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

Gets the positional index of the item.

Parameters
itemItem to find.
Exceptions
ArgumentNullExceptionitem is null.

◆ Insert() [1/2]

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

Inserts item into specified position in list.

Parameters
indexLocation to insert item.
valueItem to insert.
Exceptions
ArgumentNullExceptionvalue is null.

◆ Insert() [2/2]

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

Inserts item into specified position in list.

Parameters
indexLocation to insert item.
itemItem to insert.
Exceptions
ArgumentNullExceptionitem is null.

◆ LinqObservableCollection() [1/2]

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

Creates a new instance of the observable view.

Parameters
sourceSource list containing/managing all items.
queryResultFiltered query result over source list.
Exceptions
ArgumentNullExceptionsource or queryResult is null.

◆ LinqObservableCollection() [2/2]

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

Creates a new instance of the observable view.

Parameters
sourceSource list containing/managing all items.
queryResultFiltered query result over source list.
Exceptions
ArgumentNullExceptionsource or queryResult is null.

◆ OnCollectionChanged()

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

Raises the CollectionChanged event.

Parameters
eEventArgs for event.
Exceptions
ArgumentNullExceptione is null.

◆ Remove() [1/2]

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

Removes specified item from the list.

Parameters
valueItem to remove.
Exceptions
ArgumentNullExceptionvalue is null.

◆ Remove() [2/2]

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

Removes specified item from the list.

Parameters
itemItem to remove.
Exceptions
ArgumentNullExceptionitem is null.

◆ RemoveAt()

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

Removes item at specified index.

Parameters
indexIndex of item to remove.

Property Documentation

◆ Count

int Csla.LinqObservableCollection< T >.Count
get

Gets the number of items in the list.

◆ IsFixedSize

bool Csla.LinqObservableCollection< T >.IsFixedSize
get

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

◆ IsReadOnly

bool Csla.LinqObservableCollection< T >.IsReadOnly
get

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

◆ IsSynchronized

bool Csla.LinqObservableCollection< T >.IsSynchronized
get

Gets a value indicating whether the source list is synchronized.

◆ QueryResult

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

Gets the query result object used to filter the view.

◆ Source

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

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

◆ SyncRoot

object Csla.LinqObservableCollection< T >.SyncRoot
get

Gets the SyncRoot from the source list.

◆ this[int index]

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

Gets or sets the value at the specified index.

Parameters
indexIndex location.

Event Documentation

◆ CollectionChanged

NotifyCollectionChangedEventHandler? Csla.LinqObservableCollection< T >.CollectionChanged

Event raised when the underlying source list is changed.


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