![]() |
CSLA .NET 10.0.0
A home for your business logic
|
This is the base class from which collections of editable root business objects should be derived. More...
Public Member Functions | |
| T | SaveItem (T item) |
| Saves the specified item in the list. | |
| virtual T | SaveItem (int index) |
| Saves the specified item in the list. | |
| T[] | ToArray () |
| Get an array containing all items in the list. | |
| async Task | WaitForIdle () |
| Await this method to ensure business object is not busy. | |
| Public Member Functions inherited from Csla.Core.ExtendedBindingList< T > | |
| void | AddRange (IEnumerable< T > range) |
| Add a range of items to the list. | |
| Task | WaitForIdle (TimeSpan timeout) |
| Await this method to ensure business object is not busy. | |
| virtual Task | WaitForIdle (CancellationToken ct) |
| Await this method to ensure the business object is not busy. | |
| SuppressListChangedEventsClass (BindingList< TC > businessObject) | |
| void | Dispose () |
| Public Member Functions inherited from Csla.Core.MobileBindingList< T > | |
| LoadListModeObject (IMobileList target) | |
| Create instance of type. | |
| void | Dispose () |
| Disposes the object. | |
Protected Member Functions | |||
| DynamicBindingListBase () | |||
| Creates an instance of the type. | |||
| 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. | |||
| virtual void | OnSaved (T newObject, Exception? e) | ||
| Raises the Saved event. | |||
| override object | AddNewCore () | ||
| Adds a new item to the list. | |||
| override void | InsertItem (int index, T item) | ||
| Gives the new object a parent reference to this list. | |||
| override void | RemoveItem (int index) | ||
| Removes an item from the list. | |||
| override void | SetItem (int index, T item) | ||
| Replaces item in the list. | |||
| override void | Child_PropertyChanged (object? sender, PropertyChangedEventArgs e) | ||
| Handles any PropertyChanged event from a child object and echoes it up as a ChildChanged event. | |||
| virtual void | OnChildPropertyChanged (object? sender, PropertyChangedEventArgs e) | ||
| Override this method to be notified when a child object has been changed. | |||
| virtual void | DataPortal_OnDataPortalInvoke (DataPortalEventArgs e) | ||
| Called by the server-side DataPortal prior to calling the requested DataPortal_xyz method. | |||
| virtual void | DataPortal_OnDataPortalInvokeComplete (DataPortalEventArgs e) | ||
| Called by the server-side DataPortal after calling the requested DataPortal_xyz method. | |||
| virtual void | DataPortal_OnDataPortalException (DataPortalEventArgs e, Exception ex) | ||
| Called by the server-side DataPortal if an exception occurs during data access. | |||
| override void | OnGetState (SerializationInfo info) | ||
| Override this method to insert your field values into the MobileFormatter serialization stream. | |||
| override void | OnSetState (SerializationInfo info) | ||
| Override this method to retrieve your field values from the MobileFormatter serialization stream. | |||
| override void | OnGetMetastate (BinaryWriter writer) | ||
Override this method to write field values directly to a binary stream for metastate serialization.
| |||
| override void | OnSetMetastate (BinaryReader reader) | ||
Override this method to read field values directly from a binary stream for metastate deserialization.
| |||
| Protected Member Functions inherited from Csla.Core.ExtendedBindingList< T > | |||
| void | OnRemovingItem (T removedItem) | ||
| Raise the RemovingItem event. | |||
| override void | RemoveItem (int index) | ||
| Remove the item at the specified index. | |||
| virtual void | OnBusyChanged (BusyChangedEventArgs args) | ||
| Override this method to be notified when the IsBusy property has changed. | |||
| void | OnBusyChanged (string propertyName, bool busy) | ||
| Raises the BusyChanged event for a specific property. | |||
| virtual void | OnUnhandledAsyncException (ErrorEventArgs error) | ||
| Method invoked when an unhandled async exception has occurred. | |||
| void | OnUnhandledAsyncException (object originalSender, Exception error) | ||
| Raises the UnhandledAsyncException event. | |||
| override void | InsertItem (int index, T item) | ||
| Invoked when an item is inserted into the list. | |||
| virtual void | OnAddEventHooks (T item) | ||
| Method invoked when events are hooked for a child object. | |||
| virtual void | OnRemoveEventHooks (T item) | ||
| Method invoked when events are unhooked for a child object. | |||
| virtual void | Deserialized () | ||
| Invoked after the object has been deserialized to allow derived classes to perform custom post-deserialization processing. | |||
| virtual void | OnChildChanged (ChildChangedEventArgs e) | ||
| Raises the ChildChanged event, indicating that a child object has been changed. | |||
| Protected Member Functions inherited from Csla.Core.MobileBindingList< T > | |||
| virtual void | SetLoadListMode (bool enabled) | ||
| Sets the load list mode for the list. | |||
| virtual void | OnGetChildren (SerializationInfo info, MobileFormatter formatter) | ||
| Override this method to get custom child object values from the serialization stream. | |||
| virtual void | OnSetChildren (SerializationInfo info, MobileFormatter formatter) | ||
| Override this method to set custom child object values into the serialization stream. | |||
Properties | |
| ApplicationContext | ApplicationContext [get] |
| Gets the current ApplicationContext. | |
| override bool | IsBusy [get] |
| Gets a value indicating whether this object is currently running an async operation. | |
| Properties inherited from Csla.Core.ExtendedBindingList< T > | |
| virtual bool | IsBusy [get] |
| Gets the busy status for this object and its child objects. | |
| virtual bool | IsSelfBusy [get] |
| Gets the busy status for this object. | |
| IDisposable | SuppressListChangedEvents [get] |
| Use this object to suppress ListChangedEvents for an entire code block. May be nested in multiple levels for the same object. | |
| Properties inherited from Csla.Core.MobileBindingList< 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. | |
Events | |
| EventHandler< SavedEventArgs >? | Saved [add, remove] |
| Event raised when an object has been saved. | |
| Events inherited from Csla.Core.ExtendedBindingList< T > | |
| EventHandler< RemovingItemEventArgs >? | RemovingItem [add, remove] |
| Implements a serialization-safe RemovingItem event. | |
| BusyChangedEventHandler? | BusyChanged [add, remove] |
| Event indicating that the busy status of the object has changed. | |
| EventHandler< ErrorEventArgs >? | UnhandledAsyncException [add, remove] |
| Event indicating that an exception occurred during an async operation. | |
| EventHandler< ChildChangedEventArgs >? | ChildChanged [add, remove] |
| Event raised when a child object has been changed. | |
| Events inherited from Csla.Core.IExtendedBindingList | |
| EventHandler< RemovingItemEventArgs >? | RemovingItem |
| Event indicating that an item is being removed from the list. | |
| Events inherited from Csla.Core.INotifyBusy | |
| BusyChangedEventHandler? | BusyChanged |
| Event raised when the object's busy status changes. | |
| Events inherited from Csla.Core.INotifyUnhandledAsyncException | |
| EventHandler< ErrorEventArgs >? | UnhandledAsyncException |
| Event indicating that an exception occurred during an asynchronous operation. | |
| Events inherited from Csla.Core.INotifyChildChanged | |
| EventHandler< ChildChangedEventArgs >? | ChildChanged |
| Event indictating that a child object has changed. | |
This is the base class from which collections of editable root business objects should be derived.
| T | Type of editable root object to contain within the collection. |
Your subclass should implement a factory method and should override or overload DataPortal_Fetch() to implement data retrieval.
Saving (inserts or updates) of items in the collection should be handled through the SaveItem() method on the collection.
Removing an item from the collection through Remove() or RemoveAt() causes immediate deletion of the object, by calling the object's Delete() and Save() methods.
| T | : | IEditableBusinessObject | |
| T | : | IUndoableObject | |
| T | : | ISavable | |
| T | : | IMobileObject | |
| T | : | IBusinessObject |
|
inlineprotected |
Adds a new item to the list.
|
inlineprotectedvirtual |
Handles any PropertyChanged event from a child object and echoes it up as a ChildChanged event.
| sender | Object that raised the event. |
| e | Property changed args. |
| ArgumentNullException | e is null. |
Reimplemented from Csla.Core.ExtendedBindingList< T >.
|
inlineprotectedvirtual |
Called by the server-side DataPortal if an exception occurs during data access.
| e | The DataPortalContext object passed to the DataPortal. |
| ex | The Exception thrown during data access. |
|
inlineprotectedvirtual |
Called by the server-side DataPortal prior to calling the requested DataPortal_xyz method.
| e | The DataPortalContext object passed to the DataPortal. |
|
inlineprotectedvirtual |
Called by the server-side DataPortal after calling the requested DataPortal_xyz method.
| e | The DataPortalContext object passed to the DataPortal. |
|
inlineprotected |
Creates an instance of the type.
|
inlineprotectedvirtual |
Override this method to set up event handlers so user code in a partial class can respond to events raised by generated code.
|
inlineprotected |
Gives the new object a parent reference to this list.
| index | Index at which to insert the item. |
| item | Item to insert. |
| ArgumentNullException | item is null. |
|
inlineprotectedvirtual |
Override this method to be notified when a child object has been changed.
| sender | Child object where the PropertyChanged event originated. |
| e | PropertyChangedEventArgs from the child object. |
|
inlineprotectedvirtual |
Override this method to write field values directly to a binary stream for metastate serialization.
| writer | Binary writer for the output stream. |
Reimplemented from Csla.Core.MobileBindingList< T >.
|
inlineprotectedvirtual |
Override this method to insert your field values into the MobileFormatter serialization stream.
| info | Object containing the data to serialize. |
Reimplemented from Csla.Core.MobileBindingList< T >.
|
inlineprotectedvirtual |
Raises the Saved event.
| newObject | Reference to object returned from the save. |
| e | Reference to any exception that occurred during the save. |
| ArgumentNullException | newObject is null. |
|
inlineprotectedvirtual |
Override this method to read field values directly from a binary stream for metastate deserialization.
| reader | Binary reader for the input stream. |
Reimplemented from Csla.Core.MobileBindingList< T >.
|
inlineprotectedvirtual |
Override this method to retrieve your field values from the MobileFormatter serialization stream.
| info | Object containing the data to serialize. |
Reimplemented from Csla.Core.MobileBindingList< T >.
|
inlineprotected |
Removes an item from the list.
| index | Index of the item to be removed. |
|
inlinevirtual |
Saves the specified item in the list.
| index | Index of the item to be saved. |
This method properly saves the child item, by making sure the item in the collection is properly replaced by the result of the Save() method call.
|
inline |
Saves the specified item in the list.
| item | Reference to the item to be saved. |
This method properly saves the child item, by making sure the item in the collection is properly replaced by the result of the Save() method call.
| ArgumentNullException | item is null. |
|
inlineprotected |
Replaces item in the list.
| index | Index of the item that was replaced. |
| item | New item. |
| ArgumentNullException | item is null. |
|
inline |
Get an array containing all items in the list.
|
inline |
Await this method to ensure business object is not busy.
|
getprotected |
Gets the current ApplicationContext.
Implements Csla.Core.IUseApplicationContext.
|
get |
Gets a value indicating whether this object is currently running an async operation.
Implements Csla.Core.INotifyBusy.
|
addremove |
Event raised when an object has been saved.