This is the base class from which collections of editable root business objects should be derived. More...
Public Member Functions | |
DynamicListBase () | |
Creates an instance of the object. More... | |
async Task | SaveItemAsync (T item) |
Saves the specified item in the list. More... | |
async Task | SaveItemAsync (int index) |
Saves the specified item in the list. More... | |
void | SaveItem (T item) |
Saves the specified item in the list. More... | |
async void | SaveItem (int index) |
Saves the specified item in the list. More... | |
T[] | ToArray () |
Get an array containing all items in the list. More... | |
Public Member Functions inherited from Csla.Core.ObservableBindingList< T > | |
T | 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 | |
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 void | OnSaved (T newObject, Exception error) |
Raises the Saved event. More... | |
virtual async Task | SaveItemAsync (int index, bool delete) |
Saves the specified item in the list. More... | |
override T | AddNewCore () |
Adds a new item to the list. More... | |
override void | InsertItem (int index, T item) |
Gives the new object a parent reference to this list. More... | |
override async void | RemoveItem (int index) |
Removes an item from the list. More... | |
override void | SetItem (int index, T item) |
Replaces item in the list. More... | |
override void | OnCollectionChanged (NotifyCollectionChangedEventArgs e) |
Raises the CollectionChanged event. More... | |
override void | OnDeserialized () |
Set parent reference. 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... | |
override void | OnGetState (SerializationInfo info) |
Override this method to insert your field values into the MobileFormatter serialzation stream. More... | |
override void | OnSetState (SerializationInfo info) |
Override this method to retrieve your field values from the MobileFormatter serialzation stream. More... | |
Protected Member Functions inherited from Csla.Core.ObservableBindingList< T > | |
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 | 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... | |
override void | OnCollectionChanged (NotifyCollectionChangedEventArgs e) |
Raises the CollectionChanged event. 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 | |
bool | RaiseReplaceEvents [getset] |
Gets or sets a value indicating whether the Replace event should be raised when OnCollectionChanged() is called. More... | |
override bool | SupportsChangeNotificationCore [get] |
Gets a value indicating whether this collection supports change notification (always returns true). More... | |
override bool | IsBusy [get] |
Gets a value indicating whether this object or any child object is currently executing an async operation. More... | |
Properties inherited from Csla.Core.ObservableBindingList< T > | |
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< RemovingItemEventArgs > | RemovingItem |
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< ErrorEventArgs > | UnhandledAsyncException |
Event indicating that an exception occurred during an async operation. More... | |
EventHandler< Csla.Core.ChildChangedEventArgs > | ChildChanged |
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... | |
Properties inherited from Csla.Core.IParent | |
IParent | Parent [get] |
Provide access to the parent reference for use in child object code. 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... | |
Events | |
EventHandler< Csla.Core.SavedEventArgs > | Saved |
Event raised when an object in the list has been saved. More... | |
Events inherited from Csla.Core.IObservableBindingList | |
EventHandler< RemovingItemEventArgs > | RemovingItem |
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< ErrorEventArgs > | UnhandledAsyncException |
Event indicating that an exception occurred during an asynchronous operation. More... | |
Events inherited from Csla.Core.INotifyChildChanged | |
EventHandler< ChildChangedEventArgs > | ChildChanged |
Event indictating that a child object has changed. More... | |
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 | : | Core.IEditableBusinessObject | |
T | : | Core.IUndoableObject | |
T | : | Core.ISavable | |
T | : | IMobileObject | |
T | : | IBusinessObject |
Definition at line 45 of file DynamicListBase.cs.
Csla.DynamicListBase< T >.DynamicListBase | ( | ) |
Creates an instance of the object.
Definition at line 57 of file DynamicListBase.cs.
|
protectedvirtual |
Adds a new item to the list.
Reimplemented from Csla.Core.ObservableBindingList< T >.
Definition at line 333 of file DynamicListBase.cs.
|
protectedvirtual |
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. |
Definition at line 541 of file DynamicListBase.cs.
|
protectedvirtual |
Called by the server-side DataPortal prior to calling the requested DataPortal_xyz method.
e | The DataPortalContext object passed to the DataPortal. |
Definition at line 518 of file DynamicListBase.cs.
|
protectedvirtual |
Called by the server-side DataPortal after calling the requested DataPortal_xyz method.
e | The DataPortalContext object passed to the DataPortal. |
Definition at line 529 of file DynamicListBase.cs.
|
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 71 of file DynamicListBase.cs.
|
protected |
Gives the new object a parent reference to this list.
index | Index at which to insert the item. |
item | Item to insert. |
Definition at line 347 of file DynamicListBase.cs.
|
protected |
Raises the CollectionChanged event.
e | Event args object |
Definition at line 419 of file DynamicListBase.cs.
|
protectedvirtual |
Set parent reference.
Reimplemented from Csla.Core.ObservableBindingList< T >.
Definition at line 488 of file DynamicListBase.cs.
|
protectedvirtual |
Override this method to insert your field values into the MobileFormatter serialzation stream.
info | Object containing the data to serialize. |
Reimplemented from Csla.Core.ObservableBindingList< T >.
Definition at line 612 of file DynamicListBase.cs.
|
protectedvirtual |
Raises the Saved event.
newObject | Object returned as a result of the save operation. |
error | Exception returned as a result of the save operation. |
Definition at line 126 of file DynamicListBase.cs.
|
protectedvirtual |
Override this method to retrieve your field values from the MobileFormatter serialzation stream.
info | Object containing the data to serialize. |
Reimplemented from Csla.Core.ObservableBindingList< T >.
Definition at line 625 of file DynamicListBase.cs.
|
protected |
Removes an item from the list.
index | Index of the item to be removed. |
Definition at line 358 of file DynamicListBase.cs.
async void Csla.DynamicListBase< T >.SaveItem | ( | int | index | ) |
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.
Definition at line 260 of file DynamicListBase.cs.
void Csla.DynamicListBase< T >.SaveItem | ( | T | item | ) |
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.
Definition at line 243 of file DynamicListBase.cs.
async Task Csla.DynamicListBase< T >.SaveItemAsync | ( | int | index | ) |
Saves the specified item in the list.
index | Index of item to be saved. |
Definition at line 145 of file DynamicListBase.cs.
|
protectedvirtual |
Saves the specified item in the list.
index | Index of item to be saved. |
delete | true if the item should be deleted. |
Definition at line 155 of file DynamicListBase.cs.
async Task Csla.DynamicListBase< T >.SaveItemAsync | ( | T | item | ) |
Saves the specified item in the list.
item | Item to be saved. |
Definition at line 136 of file DynamicListBase.cs.
|
protected |
Replaces item in the list.
index | Index of the item that was replaced. |
item | New item. |
Definition at line 392 of file DynamicListBase.cs.
T[] Csla.DynamicListBase< T >.ToArray | ( | ) |
Get an array containing all items in the list.
Definition at line 553 of file DynamicListBase.cs.
|
get |
Gets a value indicating whether this object or any child object is currently executing an async operation.
Definition at line 466 of file DynamicListBase.cs.
|
getsetprotected |
Gets or sets a value indicating whether the Replace event should be raised when OnCollectionChanged() is called.
There's a bug in DataGridDataConnection that throws an exception on the replace action. By default we disable raising the replace event to avoid that bug, but some other datagrid controls require the event.
Definition at line 413 of file DynamicListBase.cs.
|
getprotected |
Gets a value indicating whether this collection supports change notification (always returns true).
Definition at line 431 of file DynamicListBase.cs.
EventHandler<Csla.Core.SavedEventArgs> Csla.DynamicListBase< T >.Saved |
Event raised when an object in the list has been saved.
Definition at line 116 of file DynamicListBase.cs.