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

Extends ObservableCollection with behaviors required by CSLA .NET collections. More...

Inheritance diagram for Csla.Core.ObservableBindingList< T >:
Csla.Core.MobileObservableCollection< T > Csla.Core.IObservableBindingList Csla.Core.INotifyBusy Csla.Core.INotifyChildChanged Csla.Serialization.Mobile.ISerializationNotification Csla.Serialization.Mobile.IMobileList Csla.Core.INotifyUnhandledAsyncException Csla.Serialization.Mobile.IMobileObject Csla.DynamicListBase< T >

Public Member Functions

AddNew ()
 Adds a new item to this collection. More...
 
void AddRange (System.Collections.Generic.IEnumerable< T > range)
 Add a range of items to the list. More...
 
virtual void OnAddedNew (T item)
 Raises the AddedNew event. More...
 

Protected Member Functions

void OnRemovingItem (T removedItem)
 Raise the RemovingItem event. More...
 
override void RemoveItem (int index)
 Remove the item at the specified index. More...
 
virtual void OnBusyChanged (BusyChangedEventArgs args)
 Override this method to be notified when the IsBusy property has changed. More...
 
void OnBusyChanged (string propertyName, bool busy)
 Raises the BusyChanged event for a specific property. More...
 
virtual void OnUnhandledAsyncException (ErrorEventArgs error)
 Method invoked when an unhandled async exception has occurred. More...
 
void OnUnhandledAsyncException (object originalSender, Exception error)
 Raises the UnhandledAsyncException event. More...
 
override void InsertItem (int index, T item)
 Invoked when an item is inserted into the list. More...
 
virtual void OnAddEventHooks (T item)
 Method invoked when events are hooked for a child object. More...
 
virtual void OnRemoveEventHooks (T item)
 Method invoked when events are unhooked for a child object. More...
 
virtual void OnDeserialized ()
 This method is called on a newly deserialized object after deserialization is complete. More...
 
virtual void OnChildChanged (ChildChangedEventArgs e)
 Raises the ChildChanged event, indicating that a child object has been changed. More...
 
virtual void Child_PropertyChanged (object sender, PropertyChangedEventArgs e)
 Handles any PropertyChanged event from a child object and echoes it up as a ChildChanged event. More...
 
virtual T AddNewCore ()
 Override this method to create a new object that is added to the collection. More...
 
override void OnCollectionChanged (NotifyCollectionChangedEventArgs e)
 Raises the CollectionChanged event. More...
 
override void OnGetState (SerializationInfo info)
 Override this method to get custom field values from the serialization stream. More...
 
override void OnSetState (SerializationInfo info)
 Override this method to set custom field values into the serialization stream. More...
 
override void SetLoadListMode (bool enabled)
 Sets the load list mode for the list More...
 
- Protected Member Functions inherited from Csla.Core.MobileObservableCollection< T >
virtual void OnGetChildren (SerializationInfo info, MobileFormatter formatter)
 Override this method to get custom child object values from the serialization stream. More...
 
virtual void OnSetChildren (SerializationInfo info, MobileFormatter formatter)
 Override this method to set custom child object values into the serialization stream. More...
 

Properties

virtual bool SupportsChangeNotificationCore [get]
 Gets a value indicating whether this object supports change notification. More...
 
bool AllowEdit [getprotected set]
 Gets or sets a value indicating whether data binding can automatically edit items in this collection. More...
 
bool AllowNew [getprotected set]
 Gets or sets a value indicating whether data binding can automatically add new items to this collection. More...
 
bool AllowRemove [getprotected set]
 Gets or sets a value indicating whether data binding can automatically remove items from this collection. More...
 
bool RaiseListChangedEvents [getset]
 Gets or sets a value indicating whether the collection should raise changed events. More...
 
EventHandler< RemovingItemEventArgsRemovingItem
 Implements a serialization-safe RemovingItem event. More...
 
BusyChangedEventHandler BusyChanged
 Event indicating that the busy status of the object has changed. More...
 
virtual bool IsBusy [get]
 Gets the busy status for this object and its child objects. More...
 
virtual bool IsSelfBusy [get]
 Gets the busy status for this object. More...
 
EventHandler< ErrorEventArgsUnhandledAsyncException
 Event indicating that an exception occurred during an async operation. More...
 
EventHandler< Csla.Core.ChildChangedEventArgsChildChanged
 Event raised when a child object has been changed. More...
 
EventHandler< AddedNewEventArgs< T > > AddedNew
 Event raised when a new object has been added to the collection. More...
 
IDisposable SuppressListChangedEvents [get]
 Use this object to suppress ListChangedEvents for an entire code block. More...
 
- Properties inherited from Csla.Core.MobileObservableCollection< T >
LoadListModeObject LoadListMode [get]
 By wrapping this property inside Using block you can set property values on current business object without raising PropertyChanged events and checking user rights. More...
 
- Properties inherited from Csla.Core.INotifyBusy
bool IsBusy [get]
 Gets a value indicating whether the object, or any of the object's child objects, are busy running an asynchronous operation. More...
 
bool IsSelfBusy [get]
 Gets a value indicating whether the object is busy running an asynchronous operation. More...
 

Additional Inherited Members

- Events inherited from Csla.Core.IObservableBindingList
EventHandler< RemovingItemEventArgsRemovingItem
 Event indicating that an item is being removed from the list. More...
 
- Events inherited from Csla.Core.INotifyBusy
BusyChangedEventHandler BusyChanged
 Event raised when the object's busy status changes. More...
 
- Events inherited from Csla.Core.INotifyUnhandledAsyncException
EventHandler< ErrorEventArgsUnhandledAsyncException
 Event indicating that an exception occurred during an asynchronous operation. More...
 
- Events inherited from Csla.Core.INotifyChildChanged
EventHandler< ChildChangedEventArgsChildChanged
 Event indictating that a child object has changed. More...
 

Detailed Description

Extends ObservableCollection with behaviors required by CSLA .NET collections.

Template Parameters
T

Definition at line 31 of file ObservableBindingList.cs.

Member Function Documentation

◆ AddNew()

Adds a new item to this collection.

Implements Csla.Core.IObservableBindingList.

Definition at line 95 of file ObservableBindingList.cs.

◆ AddNewCore()

virtual T Csla.Core.ObservableBindingList< T >.AddNewCore ( )
protectedvirtual

Override this method to create a new object that is added to the collection.

Reimplemented in Csla.BusinessListBase< T, C >, and Csla.DynamicListBase< T >.

Definition at line 530 of file ObservableBindingList.cs.

◆ AddRange()

void Csla.Core.ObservableBindingList< T >.AddRange ( System.Collections.Generic.IEnumerable< T >  range)

Add a range of items to the list.

Parameters
rangeList of items to add.

Definition at line 173 of file ObservableBindingList.cs.

◆ Child_PropertyChanged()

virtual void Csla.Core.ObservableBindingList< T >.Child_PropertyChanged ( object  sender,
PropertyChangedEventArgs  e 
)
protectedvirtual

Handles any PropertyChanged event from a child object and echoes it up as a ChildChanged event.

Parameters
senderObject that raised the event.
eProperty changed args.

Definition at line 451 of file ObservableBindingList.cs.

◆ InsertItem()

override void Csla.Core.ObservableBindingList< T >.InsertItem ( int  index,
item 
)
protected

Invoked when an item is inserted into the list.

Parameters
indexIndex of new item.
itemReference to new item.

Definition at line 298 of file ObservableBindingList.cs.

◆ OnAddedNew()

virtual void Csla.Core.ObservableBindingList< T >.OnAddedNew ( item)
virtual

Raises the AddedNew event.

Parameters
item

Definition at line 507 of file ObservableBindingList.cs.

◆ OnAddEventHooks()

virtual void Csla.Core.ObservableBindingList< T >.OnAddEventHooks ( item)
protectedvirtual

Method invoked when events are hooked for a child object.

Parameters
itemReference to child object.

Definition at line 310 of file ObservableBindingList.cs.

◆ OnBusyChanged() [1/2]

virtual void Csla.Core.ObservableBindingList< T >.OnBusyChanged ( BusyChangedEventArgs  args)
protectedvirtual

Override this method to be notified when the IsBusy property has changed.

Parameters
argsEvent arguments.

Definition at line 202 of file ObservableBindingList.cs.

◆ OnBusyChanged() [2/2]

void Csla.Core.ObservableBindingList< T >.OnBusyChanged ( string  propertyName,
bool  busy 
)
protected

Raises the BusyChanged event for a specific property.

Parameters
propertyNameName of the property.
busyNew busy value.

Definition at line 213 of file ObservableBindingList.cs.

◆ OnChildChanged()

virtual void Csla.Core.ObservableBindingList< T >.OnChildChanged ( ChildChangedEventArgs  e)
protectedvirtual

Raises the ChildChanged event, indicating that a child object has been changed.

Parameters
eChildChangedEventArgs object.

Definition at line 427 of file ObservableBindingList.cs.

◆ OnCollectionChanged()

override void Csla.Core.ObservableBindingList< T >.OnCollectionChanged ( NotifyCollectionChangedEventArgs  e)
protected

Raises the CollectionChanged event.

Parameters
eEvent arguments.

Definition at line 545 of file ObservableBindingList.cs.

◆ OnDeserialized()

virtual void Csla.Core.ObservableBindingList< T >.OnDeserialized ( )
protectedvirtual

This method is called on a newly deserialized object after deserialization is complete.

Reimplemented in Csla.BusinessListBase< T, C >, and Csla.DynamicListBase< T >.

Definition at line 371 of file ObservableBindingList.cs.

◆ OnGetState()

override void Csla.Core.ObservableBindingList< T >.OnGetState ( SerializationInfo  info)
protectedvirtual

Override this method to get custom field values from the serialization stream.

Parameters
infoSerialization info.

Reimplemented from Csla.Core.MobileObservableCollection< T >.

Reimplemented in Csla.DynamicListBase< T >.

Definition at line 561 of file ObservableBindingList.cs.

◆ OnRemoveEventHooks()

virtual void Csla.Core.ObservableBindingList< T >.OnRemoveEventHooks ( item)
protectedvirtual

Method invoked when events are unhooked for a child object.

Parameters
itemReference to child object.

Definition at line 339 of file ObservableBindingList.cs.

◆ OnRemovingItem()

void Csla.Core.ObservableBindingList< T >.OnRemovingItem ( removedItem)
protected

Raise the RemovingItem event.

Parameters
removedItemA reference to the item that is being removed.

Definition at line 139 of file ObservableBindingList.cs.

◆ OnSetState()

override void Csla.Core.ObservableBindingList< T >.OnSetState ( SerializationInfo  info)
protectedvirtual

Override this method to set custom field values into the serialization stream.

Parameters
infoSerialization info.

Reimplemented from Csla.Core.MobileObservableCollection< T >.

Reimplemented in Csla.DynamicListBase< T >.

Definition at line 577 of file ObservableBindingList.cs.

◆ OnUnhandledAsyncException() [1/2]

virtual void Csla.Core.ObservableBindingList< T >.OnUnhandledAsyncException ( ErrorEventArgs  error)
protectedvirtual

Method invoked when an unhandled async exception has occurred.

Parameters
errorEvent arguments.

Definition at line 268 of file ObservableBindingList.cs.

◆ OnUnhandledAsyncException() [2/2]

void Csla.Core.ObservableBindingList< T >.OnUnhandledAsyncException ( object  originalSender,
Exception  error 
)
protected

Raises the UnhandledAsyncException event.

Parameters
originalSenderOriginal sender of event.
errorException that occurred.

Definition at line 279 of file ObservableBindingList.cs.

◆ RemoveItem()

override void Csla.Core.ObservableBindingList< T >.RemoveItem ( int  index)
protected

Remove the item at the specified index.

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

Definition at line 158 of file ObservableBindingList.cs.

◆ SetLoadListMode()

override void Csla.Core.ObservableBindingList< T >.SetLoadListMode ( bool  enabled)
protectedvirtual

Sets the load list mode for the list

Parameters
enabledEnabled value

Reimplemented from Csla.Core.MobileObservableCollection< T >.

Definition at line 633 of file ObservableBindingList.cs.

Property Documentation

◆ AddedNew

EventHandler<AddedNewEventArgs<T> > Csla.Core.ObservableBindingList< T >.AddedNew
addremove

Event raised when a new object has been added to the collection.

Definition at line 488 of file ObservableBindingList.cs.

◆ AllowEdit

bool Csla.Core.ObservableBindingList< T >.AllowEdit
getprotected set

Gets or sets a value indicating whether data binding can automatically edit items in this collection.

Definition at line 56 of file ObservableBindingList.cs.

◆ AllowNew

bool Csla.Core.ObservableBindingList< T >.AllowNew
getprotected set

Gets or sets a value indicating whether data binding can automatically add new items to this collection.

Definition at line 66 of file ObservableBindingList.cs.

◆ AllowRemove

bool Csla.Core.ObservableBindingList< T >.AllowRemove
getprotected set

Gets or sets a value indicating whether data binding can automatically remove items from this collection.

Definition at line 76 of file ObservableBindingList.cs.

◆ BusyChanged

Event indicating that the busy status of the object has changed.

Definition at line 191 of file ObservableBindingList.cs.

◆ ChildChanged

EventHandler<Csla.Core.ChildChangedEventArgs> Csla.Core.ObservableBindingList< T >.ChildChanged
addremove

Event raised when a child object has been changed.

Definition at line 405 of file ObservableBindingList.cs.

◆ IsBusy

virtual bool Csla.Core.ObservableBindingList< T >.IsBusy
get

Gets the busy status for this object and its child objects.

Definition at line 224 of file ObservableBindingList.cs.

◆ IsSelfBusy

virtual bool Csla.Core.ObservableBindingList< T >.IsSelfBusy
get

Gets the busy status for this object.

Definition at line 235 of file ObservableBindingList.cs.

◆ RaiseListChangedEvents

bool Csla.Core.ObservableBindingList< T >.RaiseListChangedEvents
getset

Gets or sets a value indicating whether the collection should raise changed events.

Definition at line 86 of file ObservableBindingList.cs.

◆ RemovingItem

EventHandler<RemovingItemEventArgs> Csla.Core.ObservableBindingList< T >.RemovingItem
addremove

Implements a serialization-safe RemovingItem event.

Definition at line 117 of file ObservableBindingList.cs.

◆ SupportsChangeNotificationCore

virtual bool Csla.Core.ObservableBindingList< T >.SupportsChangeNotificationCore
getprotected

Gets a value indicating whether this object supports change notification.

Definition at line 44 of file ObservableBindingList.cs.

◆ SuppressListChangedEvents

IDisposable Csla.Core.ObservableBindingList< T >.SuppressListChangedEvents
get

Use this object to suppress ListChangedEvents for an entire code block.

May be nested in multiple levels for the same object.

Definition at line 595 of file ObservableBindingList.cs.

◆ UnhandledAsyncException

EventHandler<ErrorEventArgs> Csla.Core.ObservableBindingList< T >.UnhandledAsyncException
addremove

Event indicating that an exception occurred during an async operation.

Definition at line 257 of file ObservableBindingList.cs.