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.ReadOnlyListBase< T, C > Class Template Reference

This is the base class from which readonly collections of readonly objects should be derived. More...

Inheritance diagram for Csla.ReadOnlyListBase< T, C >:
Csla.Core.ReadOnlyObservableBindingList< C > Csla.Core.IReadOnlyCollection Csla.IReadOnlyListBase< C > Csla.Core.IUseApplicationContext Csla.Serialization.Mobile.IMobileObject Csla.Serialization.Mobile.ISerializationNotification Csla.Core.INotifyChildChanged Csla.Core.INotifyUnhandledAsyncException Csla.Core.INotifyBusy Csla.Core.IObservableBindingList Csla.Core.IBusinessObject Csla.Core.IReadOnlyCollection Csla.Core.IBusinessObject Csla.Core.ObservableBindingList< C >

Public Member Functions

Clone ()
 Creates a clone of the object. More...
 
C[] ToArray ()
 Get an array containing all items in the list. More...
 
- Public Member Functions inherited from Csla.Core.ReadOnlyObservableBindingList< C >
 ReadOnlyObservableBindingList ()
 Creates an instance of the type. More...
 
- Public Member Functions inherited from Csla.Core.ObservableBindingList< C >
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...
 
- Public Member Functions inherited from Csla.Core.IObservableBindingList
object AddNew ()
 Creates and adds a new item to the collection. More...
 
- Public Member Functions inherited from Csla.Serialization.Mobile.ISerializationNotification
void Deserialized ()
 Method called on an object after deserialization is complete. More...
 
- Public Member Functions inherited from Csla.Serialization.Mobile.IMobileObject
void GetState (SerializationInfo info)
 Method called by MobileFormatter when an object should serialize its data. More...
 
void GetChildren (SerializationInfo info, MobileFormatter formatter)
 Method called by MobileFormatter when an object should serialize its child references. More...
 
void SetState (SerializationInfo info)
 Method called by MobileFormatter when an object should be deserialized. More...
 
void SetChildren (SerializationInfo info, MobileFormatter formatter)
 Method called by MobileFormatter when an object should deserialize its child references. More...
 

Protected Member Functions

 ReadOnlyListBase ()
 Creates an instance of the type. More...
 
virtual void Initialize ()
 Override this method to set up event handlers so user code in a partial class can respond to events raised by generated code. More...
 
virtual object GetClone ()
 Creates a clone of the object. More...
 
virtual void DataPortal_OnDataPortalInvoke (DataPortalEventArgs e)
 Called by the server-side DataPortal prior to calling the requested DataPortal_xyz method. More...
 
virtual void DataPortal_OnDataPortalInvokeComplete (DataPortalEventArgs e)
 Called by the server-side DataPortal after calling the requested DataPortal_xyz method. More...
 
virtual void DataPortal_OnDataPortalException (DataPortalEventArgs e, Exception ex)
 Called by the server-side DataPortal if an exception occurs during data access. More...
 
virtual void Child_OnDataPortalInvoke (DataPortalEventArgs e)
 Called by the server-side DataPortal prior to calling the requested DataPortal_XYZ method. More...
 
virtual void Child_OnDataPortalInvokeComplete (DataPortalEventArgs e)
 Called by the server-side DataPortal after calling the requested DataPortal_XYZ method. More...
 
virtual void Child_OnDataPortalException (DataPortalEventArgs e, Exception ex)
 Called by the server-side DataPortal if an exception occurs during data access. More...
 
- Protected Member Functions inherited from Csla.Core.ReadOnlyObservableBindingList< C >
override void OnCollectionChanged (NotifyCollectionChangedEventArgs e)
 Method invoked when collection is changed. More...
 
override void SetLoadListMode (bool enabled)
 Sets the LoadListMode for the collection 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.ObservableBindingList< 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...
 
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...
 

Properties

ApplicationContext ApplicationContext [get]
 Gets the current ApplicationContext More...
 
- Properties inherited from Csla.Core.ReadOnlyObservableBindingList< C >
bool IsReadOnly [getprotected set]
 Gets or sets a value indicating whether the list is readonly. More...
 
- Properties inherited from Csla.Core.ObservableBindingList< C >
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.IBusinessObject
int Identity [get]
 Gets a value representing this object instance's unique identity value within the business object graph. 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...
 
- Properties inherited from Csla.Core.IUseApplicationContext
ApplicationContext ApplicationContext [getset]
 Gets or sets the current ApplicationContext object. 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

This is the base class from which readonly collections of readonly objects should be derived.

Template Parameters
TType of the list class.
CType of child objects contained in the list.
Type Constraints
T :ReadOnlyListBase 
T :T 
T :C 

Definition at line 24 of file ReadOnlyListBase.cs.

Constructor & Destructor Documentation

◆ ReadOnlyListBase()

Csla.ReadOnlyListBase< T, C >.ReadOnlyListBase ( )
protected

Creates an instance of the type.

Definition at line 52 of file ReadOnlyListBase.cs.

Member Function Documentation

◆ Child_OnDataPortalException()

virtual void Csla.ReadOnlyListBase< T, C >.Child_OnDataPortalException ( DataPortalEventArgs  e,
Exception  ex 
)
protectedvirtual

Called by the server-side DataPortal if an exception occurs during data access.

Parameters
eThe DataPortalContext object passed to the DataPortal.
exThe Exception thrown during data access.

Definition at line 197 of file ReadOnlyListBase.cs.

◆ Child_OnDataPortalInvoke()

virtual void Csla.ReadOnlyListBase< T, C >.Child_OnDataPortalInvoke ( DataPortalEventArgs  e)
protectedvirtual

Called by the server-side DataPortal prior to calling the requested DataPortal_XYZ method.

Parameters
eThe DataPortalContext object passed to the DataPortal.

Definition at line 174 of file ReadOnlyListBase.cs.

◆ Child_OnDataPortalInvokeComplete()

virtual void Csla.ReadOnlyListBase< T, C >.Child_OnDataPortalInvokeComplete ( DataPortalEventArgs  e)
protectedvirtual

Called by the server-side DataPortal after calling the requested DataPortal_XYZ method.

Parameters
eThe DataPortalContext object passed to the DataPortal.

Definition at line 185 of file ReadOnlyListBase.cs.

◆ Clone()

T Csla.ReadOnlyListBase< T, C >.Clone ( )

Creates a clone of the object.

Returns
A new object containing the exact data of the original object.

Definition at line 98 of file ReadOnlyListBase.cs.

◆ DataPortal_OnDataPortalException()

virtual void Csla.ReadOnlyListBase< T, C >.DataPortal_OnDataPortalException ( DataPortalEventArgs  e,
Exception  ex 
)
protectedvirtual

Called by the server-side DataPortal if an exception occurs during data access.

Parameters
eThe DataPortalContext object passed to the DataPortal.
exThe Exception thrown during data access.

Definition at line 162 of file ReadOnlyListBase.cs.

◆ DataPortal_OnDataPortalInvoke()

virtual void Csla.ReadOnlyListBase< T, C >.DataPortal_OnDataPortalInvoke ( DataPortalEventArgs  e)
protectedvirtual

Called by the server-side DataPortal prior to calling the requested DataPortal_xyz method.

Parameters
eThe DataPortalContext object passed to the DataPortal.

Definition at line 137 of file ReadOnlyListBase.cs.

◆ DataPortal_OnDataPortalInvokeComplete()

virtual void Csla.ReadOnlyListBase< T, C >.DataPortal_OnDataPortalInvokeComplete ( DataPortalEventArgs  e)
protectedvirtual

Called by the server-side DataPortal after calling the requested DataPortal_xyz method.

Parameters
eThe DataPortalContext object passed to the DataPortal.

Definition at line 149 of file ReadOnlyListBase.cs.

◆ GetClone()

virtual object Csla.ReadOnlyListBase< T, C >.GetClone ( )
protectedvirtual

Creates a clone of the object.

Returns
A new object containing the exact data of the original object.

Definition at line 87 of file ReadOnlyListBase.cs.

◆ Initialize()

virtual void Csla.ReadOnlyListBase< T, C >.Initialize ( )
protectedvirtual

Override this method to set up event handlers so user code in a partial class can respond to events raised by generated code.

Definition at line 62 of file ReadOnlyListBase.cs.

◆ ToArray()

C[] Csla.ReadOnlyListBase< T, C >.ToArray ( )

Get an array containing all items in the list.

Definition at line 110 of file ReadOnlyListBase.cs.

Property Documentation

◆ ApplicationContext

Gets the current ApplicationContext

Definition at line 38 of file ReadOnlyListBase.cs.