Wraps and creates a CSLA .NET-style object that you can use as a binding source.
More...
|
| | CslaDataProvider () |
| | Creates an instance of the object.
|
| void | Rebind () |
| | Triggers WPF data binding to rebind to the data object.
|
| void | Refresh< T > (Func< T > factory) |
| | Refresh the ObjectInstance by calling the supplied factory.
|
| async Task | Refresh< T > (Func< Task< T > > factory) |
| | Refresh the ObjectInstance by calling the supplied factory asynchronously.
|
| void | Cancel () |
| | Cancels changes to the business object, returning it to its previous state.
|
| void | Save () |
| | Accepts changes to the business object, and commits them by calling the object's Save() method.
|
| object? | AddNew () |
| | Adds a new item to the object if the object implements IBindingList and AllowNew is true.
|
| void | RemoveItem (object? sender, ExecuteEventArgs e) |
| | Removes an item from the list if the object implements IBindingList and AllowRemove is true.
|
|
| virtual void | OnSaved (object newObject, Exception? error, object? userState) |
| | Raise the Saved event when the object has been saved.
|
| override void | BeginInit () |
| | Indicates that the control is about to initialize.
|
| override void | EndInit () |
| | Indicates that the control has initialized.
|
| override void | BeginQuery () |
| | Overridden. Starts to create the requested object, either immediately or on a background thread, based on the value of the IsAsynchronous property.
|
|
| CslaDataProviderCommandManager | CommandManager [get] |
| | Gets an object that can be used to execute Save and Undo commands on this CslaDataProvider through XAML command bindings.
|
| Type? | ObjectType [get, set] |
| | Gets or sets the type of object to create an instance of.
|
| bool | ManageObjectLifetime [get, set] |
| | Gets or sets a value indicating whether the data control should manage the lifetime of the business object, including using n-level undo.
|
| object? | DataChangedHandler [get, set] |
| | Gets or sets a reference to an object that will handle the DataChanged event raised by this data provider.
|
| string | FactoryMethod [get, set] |
| | Gets or sets the name of the static (Shared in Visual Basic) factory method that should be called to create the object instance.
|
| IList | FactoryParameters [get] |
| | Get the list of parameters to pass to the factory method.
|
| bool | IsAsynchronous [get, set] |
| | Gets or sets a value that indicates whether to perform object creation in a worker thread or in the active context.
|
| object? | ObjectInstance [get, set] |
| | Gets or sets a reference to the data object.
|
| bool | IsBusy [get, protected set] |
| | Gets a value indicating if this object is busy.
|
Wraps and creates a CSLA .NET-style object that you can use as a binding source.
◆ CslaDataProvider()
| Csla.Xaml.CslaDataProvider.CslaDataProvider |
( |
| ) |
|
|
inline |
Creates an instance of the object.
◆ AddNew()
| object? Csla.Xaml.CslaDataProvider.AddNew |
( |
| ) |
|
|
inline |
Adds a new item to the object if the object implements IBindingList and AllowNew is true.
◆ BeginInit()
| override void Csla.Xaml.CslaDataProvider.BeginInit |
( |
| ) |
|
|
inlineprotected |
Indicates that the control is about to initialize.
◆ BeginQuery()
| override void Csla.Xaml.CslaDataProvider.BeginQuery |
( |
| ) |
|
|
inlineprotected |
Overridden. Starts to create the requested object, either immediately or on a background thread, based on the value of the IsAsynchronous property.
◆ Cancel()
| void Csla.Xaml.CslaDataProvider.Cancel |
( |
| ) |
|
|
inline |
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.
◆ EndInit()
| override void Csla.Xaml.CslaDataProvider.EndInit |
( |
| ) |
|
|
inlineprotected |
Indicates that the control has initialized.
◆ OnSaved()
| virtual void Csla.Xaml.CslaDataProvider.OnSaved |
( |
object | newObject, |
|
|
Exception? | error, |
|
|
object? | userState ) |
|
inlineprotectedvirtual |
Raise the Saved event when the object has been saved.
- Parameters
-
| 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. |
- Exceptions
-
| ArgumentNullException | newObject is null. |
◆ Rebind()
| void Csla.Xaml.CslaDataProvider.Rebind |
( |
| ) |
|
|
inline |
Triggers WPF data binding to rebind to the data object.
◆ Refresh< T >() [1/2]
| void Csla.Xaml.CslaDataProvider.Refresh< T > |
( |
Func< T > | factory | ) |
|
|
inline |
Refresh the ObjectInstance by calling the supplied factory.
- Template Parameters
-
- Parameters
-
| factory | Sync data portal or factory method |
- Exceptions
-
| ArgumentNullException | factory is null. |
◆ Refresh< T >() [2/2]
| async Task Csla.Xaml.CslaDataProvider.Refresh< T > |
( |
Func< Task< T > > | factory | ) |
|
|
inline |
Refresh the ObjectInstance by calling the supplied factory asynchronously.
- Template Parameters
-
- Parameters
-
| factory | Async data portal or factory method |
- Returns
- A Task representing the asynchronous refresh operation.
- Exceptions
-
| ArgumentNullException | factory is null. |
◆ RemoveItem()
| void Csla.Xaml.CslaDataProvider.RemoveItem |
( |
object? | sender, |
|
|
ExecuteEventArgs | e ) |
|
inline |
Removes an item from the list if the object implements IBindingList and AllowRemove is true.
- Parameters
-
| sender | Object invoking this method. |
| e | ExecuteEventArgs, where MethodParameter contains the item to be removed from the list. |
- Exceptions
-
| ArgumentNullException | e is null. |
◆ Save()
| void Csla.Xaml.CslaDataProvider.Save |
( |
| ) |
|
|
inline |
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.
◆ CommandManager
Gets an object that can be used to execute Save and Undo commands on this CslaDataProvider through XAML command bindings.
◆ DataChangedHandler
| object? Csla.Xaml.CslaDataProvider.DataChangedHandler |
|
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.
◆ FactoryMethod
| string Csla.Xaml.CslaDataProvider.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.
- Exceptions
-
◆ FactoryParameters
| IList Csla.Xaml.CslaDataProvider.FactoryParameters |
|
get |
Get the list of parameters to pass to the factory method.
◆ IsAsynchronous
| bool Csla.Xaml.CslaDataProvider.IsAsynchronous |
|
getset |
Gets or sets a value that indicates whether to perform object creation in a worker thread or in the active context.
◆ IsBusy
| bool Csla.Xaml.CslaDataProvider.IsBusy |
|
getprotected set |
Gets a value indicating if this object is busy.
◆ ManageObjectLifetime
| bool Csla.Xaml.CslaDataProvider.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.
◆ ObjectInstance
| object? Csla.Xaml.CslaDataProvider.ObjectInstance |
|
getset |
Gets or sets a reference to the data object.
◆ ObjectType
| Type? Csla.Xaml.CslaDataProvider.ObjectType |
|
getset |
Gets or sets the type of object to create an instance of.
◆ Saved
Event raised when the object has been saved.
The documentation for this class was generated from the following file: