Wraps and creates a CSLA .NET-style object that you can use as a binding source. More...
Public Member Functions | |
CslaDataProvider () | |
Creates an instance of the object. More... | |
void | Rebind () |
Triggers WPF data binding to rebind to the data object. More... | |
void | Cancel () |
Cancels changes to the business object, returning it to its previous state. More... | |
void | Save () |
Accepts changes to the business object, and commits them by calling the object's Save() method. More... | |
object | AddNew () |
Adds a new item to the object if the object implements IBindingList and AllowNew is true. More... | |
void | RemoveItem (object sender, ExecuteEventArgs e) |
Removes an item from the list if the object implements IBindingList and AllowRemove is true. More... | |
Protected Member Functions | |
virtual void | OnSaved (object newObject, Exception error, object userState) |
Raise the Saved event when the object has been saved. More... | |
override void | BeginInit () |
Indicates that the control is about to initialize. More... | |
override void | EndInit () |
Indicates that the control has initialized. More... | |
override void | BeginQuery () |
Overridden. More... | |
Properties | |
CslaDataProviderCommandManager | CommandManager [get] |
Gets an object that can be used to execute Save and Undo commands on this CslaDataProvider through XAML command bindings. More... | |
Type | ObjectType [getset] |
Gets or sets the type of object to create an instance of. More... | |
bool | ManageObjectLifetime [getset] |
Gets or sets a value indicating whether the data control should manage the lifetime of the business object, including using n-level undo. More... | |
object | DataChangedHandler [getset] |
Gets or sets a reference to an object that will handle the DataChanged event raised by this data provider. More... | |
string | FactoryMethod [getset] |
Gets or sets the name of the static (Shared in Visual Basic) factory method that should be called to create the object instance. More... | |
IList | FactoryParameters [get] |
Get the list of parameters to pass to the factory method. More... | |
bool | IsAsynchronous [getset] |
Gets or sets a value that indicates whether to perform object creation in a worker thread or in the active context. More... | |
object | ObjectInstance [getset] |
Gets or sets a reference to the data object. More... | |
bool | IsBusy [getprotected set] |
Gets a value indicating if this object is busy. More... | |
Events | |
EventHandler< Csla.Core.SavedEventArgs > | Saved |
Event raised when the object has been saved. More... | |
Wraps and creates a CSLA .NET-style object that you can use as a binding source.
Definition at line 25 of file CslaDataProvider.cs.
Csla.Xaml.CslaDataProvider.CslaDataProvider | ( | ) |
Creates an instance of the object.
Definition at line 31 of file CslaDataProvider.cs.
object Csla.Xaml.CslaDataProvider.AddNew | ( | ) |
Adds a new item to the object if the object implements IBindingList and AllowNew is true.
Definition at line 532 of file CslaDataProvider.cs.
|
protected |
Indicates that the control is about to initialize.
Definition at line 241 of file CslaDataProvider.cs.
|
protected |
Overridden.
Starts to create the requested object, either immediately or on a background thread, based on the value of the IsAsynchronous property.
Definition at line 262 of file CslaDataProvider.cs.
void Csla.Xaml.CslaDataProvider.Cancel | ( | ) |
Cancels changes to the business object, returning it to its previous state.
This metod does nothing unless ManageLifetime is set to true and the object supports n-level undo.
Definition at line 442 of file CslaDataProvider.cs.
|
protected |
Indicates that the control has initialized.
Definition at line 250 of file CslaDataProvider.cs.
|
protectedvirtual |
Raise the Saved event when the object has been saved.
newObject | New object reference as a result of the save operation. |
error | Reference to an exception object if an error occurred. |
userState | Reference to a userstate object. |
Definition at line 51 of file CslaDataProvider.cs.
void Csla.Xaml.CslaDataProvider.Rebind | ( | ) |
Triggers WPF data binding to rebind to the data object.
Definition at line 222 of file CslaDataProvider.cs.
void Csla.Xaml.CslaDataProvider.RemoveItem | ( | object | sender, |
ExecuteEventArgs | e | ||
) |
Removes an item from the list if the object implements IBindingList and AllowRemove is true.
sender | Object invoking this method. |
e | ExecuteEventArgs, where MethodParameter contains the item to be removed from the list. |
Definition at line 553 of file CslaDataProvider.cs.
void Csla.Xaml.CslaDataProvider.Save | ( | ) |
Accepts changes to the business object, and commits them by calling the object's Save() method.
This method does nothing unless the object implements Csla.Core.ISavable.
If the object implements IClonable, it will be cloned, and the clone will be saved.
If the object supports n-level undo and ManageLifetime is true, then this method will automatically call ApplyEdit() and BeginEdit() appropriately.
Definition at line 474 of file CslaDataProvider.cs.
|
get |
Gets an object that can be used to execute Save and Undo commands on this CslaDataProvider through XAML command bindings.
Definition at line 78 of file CslaDataProvider.cs.
|
getset |
Gets or sets a reference to an object that will handle the DataChanged event raised by this data provider.
This property is designed to reference an IErrorDialog control.
Definition at line 133 of file CslaDataProvider.cs.
|
getset |
Gets or sets the name of the static (Shared in Visual Basic) factory method that should be called to create the object instance.
Definition at line 155 of file CslaDataProvider.cs.
|
get |
Get the list of parameters to pass to the factory method.
Definition at line 172 of file CslaDataProvider.cs.
|
getset |
Gets or sets a value that indicates whether to perform object creation in a worker thread or in the active context.
Definition at line 185 of file CslaDataProvider.cs.
|
getprotected set |
Gets a value indicating if this object is busy.
Definition at line 208 of file CslaDataProvider.cs.
|
getset |
Gets or sets a value indicating whether the data control should manage the lifetime of the business object, including using n-level undo.
Definition at line 109 of file CslaDataProvider.cs.
|
getset |
Gets or sets a reference to the data object.
Definition at line 195 of file CslaDataProvider.cs.
|
getset |
Gets or sets the type of object to create an instance of.
Definition at line 90 of file CslaDataProvider.cs.
EventHandler<Csla.Core.SavedEventArgs> Csla.Xaml.CslaDataProvider.Saved |
Event raised when the object has been saved.
Definition at line 42 of file CslaDataProvider.cs.