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.ReadOnlyBindingList< C > Class Template Reference

A readonly version of BindingList(Of T) More...

Inheritance diagram for Csla.Core.ReadOnlyBindingList< C >:
Csla.Core.ExtendedBindingList< C > Csla.Core.IBusinessObject Csla.ReadOnlyBindingListBase< T, C >

Protected Member Functions

override void SetLoadListMode (bool enabled)
 Sets the LoadListMode for the collection More...
 
 ReadOnlyBindingList ()
 Creates an instance of the object. More...
 
override void ClearItems ()
 Prevents clearing the collection. More...
 
override object AddNewCore ()
 Prevents insertion of items into the collection. More...
 
override void InsertItem (int index, C item)
 Prevents insertion of items into the collection. More...
 
override void RemoveItem (int index)
 Removes the item at the specified index if the collection is not in readonly mode. More...
 
override void SetItem (int index, C item)
 Replaces the item at the specified index with the specified item if the collection is not in readonly mode. More...
 
override void OnGetState (Csla.Serialization.Mobile.SerializationInfo info)
 Override this method to insert your field values into the MobileFormatter serialzation stream. More...
 
override void OnSetState (Csla.Serialization.Mobile.SerializationInfo info)
 Override this method to retrieve your field values from the MobileFormatter serialzation stream. More...
 
override void OnSetChildren (Csla.Serialization.Mobile.SerializationInfo info, Csla.Serialization.Mobile.MobileFormatter formatter)
 Override this method to retrieve your child object references from the MobileFormatter serialzation stream. More...
 
- Protected Member Functions inherited from Csla.Core.ExtendedBindingList< C >
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...
 

Properties

bool IsReadOnly [getprotected set]
 Gets or sets a value indicating whether the list is readonly. More...
 
virtual bool IsReadOnlyCore [getset]
 Gets or sets a value indicating whether the list is readonly. More...
 
override bool IsBusy [get]
 Gets a value indicating whether this object or its child objects are busy. More...
 
- Properties inherited from Csla.Core.ExtendedBindingList< C >
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...
 
IDisposable SuppressListChangedEvents [get]
 Use this object to suppress ListChangedEvents for an entire code block. More...
 
- Properties inherited from Csla.Core.IBusinessObject
int Identity [get]
 Gets a value representing this object instance's unique identity value within the business object graph. More...
 

Additional Inherited Members

- Public Member Functions inherited from Csla.Core.ExtendedBindingList< C >
void AddRange (System.Collections.Generic.IEnumerable< T > range)
 Add a range of items to the list. More...
 

Detailed Description

A readonly version of BindingList(Of T)

Template Parameters
CType of item contained in the list.

This is a subclass of BindingList(Of T) that implements a readonly list, preventing adding and removing of items from the list. Use the IsReadOnly property to unlock the list for loading/unloading data.

Definition at line 26 of file ReadOnlyBindingList.cs.

Constructor & Destructor Documentation

◆ ReadOnlyBindingList()

Creates an instance of the object.

Definition at line 83 of file ReadOnlyBindingList.cs.

Member Function Documentation

◆ AddNewCore()

override object Csla.Core.ReadOnlyBindingList< C >.AddNewCore ( )
protected

Prevents insertion of items into the collection.

Definition at line 120 of file ReadOnlyBindingList.cs.

◆ ClearItems()

override void Csla.Core.ReadOnlyBindingList< C >.ClearItems ( )
protected

Prevents clearing the collection.

Definition at line 95 of file ReadOnlyBindingList.cs.

◆ InsertItem()

override void Csla.Core.ReadOnlyBindingList< C >.InsertItem ( int  index,
item 
)
protected

Prevents insertion of items into the collection.

Parameters
indexIndex at which to insert the item.
itemItem to insert.

Definition at line 134 of file ReadOnlyBindingList.cs.

◆ OnGetState()

override void Csla.Core.ReadOnlyBindingList< C >.OnGetState ( Csla.Serialization.Mobile.SerializationInfo  info)
protected

Override this method to insert your field values into the MobileFormatter serialzation stream.

Parameters
infoObject containing the data to serialize.

Definition at line 214 of file ReadOnlyBindingList.cs.

◆ OnSetChildren()

Override this method to retrieve your child object references from the MobileFormatter serialzation stream.

Parameters
infoObject containing the data to serialize.
formatterReference to MobileFormatter instance. Use this to convert child references to/from reference id values.

Definition at line 244 of file ReadOnlyBindingList.cs.

◆ OnSetState()

override void Csla.Core.ReadOnlyBindingList< C >.OnSetState ( Csla.Serialization.Mobile.SerializationInfo  info)
protected

Override this method to retrieve your field values from the MobileFormatter serialzation stream.

Parameters
infoObject containing the data to serialize.

Definition at line 227 of file ReadOnlyBindingList.cs.

◆ RemoveItem()

override void Csla.Core.ReadOnlyBindingList< C >.RemoveItem ( int  index)
protected

Removes the item at the specified index if the collection is not in readonly mode.

Parameters
indexIndex of the item to remove.

Definition at line 149 of file ReadOnlyBindingList.cs.

◆ SetItem()

override void Csla.Core.ReadOnlyBindingList< C >.SetItem ( int  index,
item 
)
protected

Replaces the item at the specified index with the specified item if the collection is not in readonly mode.

Parameters
indexIndex of the item to replace.
itemNew item for the list.

Definition at line 169 of file ReadOnlyBindingList.cs.

◆ SetLoadListMode()

override void Csla.Core.ReadOnlyBindingList< C >.SetLoadListMode ( bool  enabled)
protected

Sets the LoadListMode for the collection

Parameters
enabledEnable or disable mode

Definition at line 74 of file ReadOnlyBindingList.cs.

Property Documentation

◆ IsBusy

override bool Csla.Core.ReadOnlyBindingList< C >.IsBusy
get

Gets a value indicating whether this object or its child objects are busy.

Definition at line 185 of file ReadOnlyBindingList.cs.

◆ IsReadOnly

bool Csla.Core.ReadOnlyBindingList< C >.IsReadOnly
getprotected set

Gets or sets a value indicating whether the list is readonly.

Subclasses can set this value to unlock the collection in order to alter the collection's data.

True indicates that the list is readonly.

Definition at line 48 of file ReadOnlyBindingList.cs.

◆ IsReadOnlyCore

virtual bool Csla.Core.ReadOnlyBindingList< C >.IsReadOnlyCore
getsetprotected

Gets or sets a value indicating whether the list is readonly.

Definition at line 58 of file ReadOnlyBindingList.cs.