Class ViewModelSummary<TEntity>
Implements
Inherited Members
Namespace: ISynergy.Framework.Mvvm.ViewModels
Assembly: ISynergy.Framework.Mvvm.dll
Syntax
public abstract class ViewModelSummary<TEntity> : ViewModel, IViewModelSummary<TEntity>, IViewModelSelectedItem<TEntity>, IViewModel, IObservableClass, IBindable, ICleanup
Type Parameters
Name | Description |
---|---|
TEntity |
Constructors
View SourceViewModelSummary(IContext, IBaseCommonServices, ILogger, Boolean, Boolean)
Initializes a new instance of the ViewModelSummary<TEntity> class.
Declaration
protected ViewModelSummary(IContext context, IBaseCommonServices commonServices, ILogger logger, bool refreshOnInitialization = true, bool automaticValidation = false)
Parameters
Type | Name | Description |
---|---|---|
IContext | context | The context. |
IBaseCommonServices | commonServices | The common services. |
ILogger | logger | The logger factory. |
System.Boolean | refreshOnInitialization | if set to |
System.Boolean | automaticValidation |
Properties
View SourceAddCommand
Gets or sets the add command.
Declaration
public AsyncRelayCommand AddCommand { get; }
Property Value
Type | Description |
---|---|
AsyncRelayCommand | The add command. |
DeleteCommand
Gets or sets the delete command.
Declaration
public AsyncRelayCommand<TEntity> DeleteCommand { get; }
Property Value
Type | Description |
---|---|
AsyncRelayCommand<TEntity> | The delete command. |
EditCommand
Gets or sets the edit command.
Declaration
public AsyncRelayCommand<TEntity> EditCommand { get; }
Property Value
Type | Description |
---|---|
AsyncRelayCommand<TEntity> | The edit command. |
IsUpdate
Gets or sets the IsUpdate property value.
Declaration
public bool IsUpdate { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Items
Gets or sets the Items property value.
Declaration
public ObservableCollection<TEntity> Items { get; set; }
Property Value
Type | Description |
---|---|
ObservableCollection<TEntity> | The items. |
RefreshCommand
Gets or sets the refresh command.
Declaration
public AsyncRelayCommand RefreshCommand { get; }
Property Value
Type | Description |
---|---|
AsyncRelayCommand | The refresh command. |
RefreshOnInitialization
Gets a value indicating whether [refresh on initialization].
Declaration
public bool RefreshOnInitialization { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
SearchCommand
Gets or sets the search command.
Declaration
public AsyncRelayCommand<object> SearchCommand { get; }
Property Value
Type | Description |
---|---|
AsyncRelayCommand<System.Object> | The search command. |
SelectedItem
Gets or sets the SelectedItem property value.
Declaration
public TEntity SelectedItem { get; set; }
Property Value
Type | Description |
---|---|
TEntity | The selected item. |
SubmitCommand
Gets or sets the submit command.
Declaration
public AsyncRelayCommand<TEntity> SubmitCommand { get; }
Property Value
Type | Description |
---|---|
AsyncRelayCommand<TEntity> | The submit command. |
Methods
View SourceAddAsync()
Adds the asynchronous.
Declaration
public abstract Task AddAsync()
Returns
Type | Description |
---|---|
Task | Task. |
ApplyQueryAttributes(IDictionary<String, Object>)
Declaration
public virtual void ApplyQueryAttributes(IDictionary<string, object> query)
Parameters
Type | Name | Description |
---|---|---|
IDictionary<System.String, System.Object> | query |
Cleanup()
Declaration
public override void Cleanup()
Overrides
View SourceDeleteAsync(TEntity)
delete as an asynchronous operation.
Declaration
public async Task DeleteAsync(TEntity e)
Parameters
Type | Name | Description |
---|---|---|
TEntity | e | The e. |
Returns
Type | Description |
---|---|
Task |
Dispose(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
Overrides
View SourceEditAsync(TEntity)
Edits the asynchronous.
Declaration
public abstract Task EditAsync(TEntity e)
Parameters
Type | Name | Description |
---|---|---|
TEntity | e | The e. |
Returns
Type | Description |
---|---|
Task | Task. |
GetItemsAsync()
get items as an asynchronous operation.
Declaration
public async Task<bool> GetItemsAsync()
Returns
Type | Description |
---|---|
Task<System.Boolean> |
|
InitializeAsync()
initialize as an asynchronous operation.
Declaration
public override async Task InitializeAsync()
Returns
Type | Description |
---|---|
Task | Task. |
Overrides
View SourceOnSubmitted(SubmitEventArgs<TEntity>)
Called when [submitted].
Declaration
protected virtual void OnSubmitted(SubmitEventArgs<TEntity> e)
Parameters
Type | Name | Description |
---|---|---|
SubmitEventArgs<TEntity> | e | The e. |
RefreshAsync()
Refreshes the asynchronous.
Declaration
public virtual Task<bool> RefreshAsync()
Returns
Type | Description |
---|---|
Task<System.Boolean> | Task<System.Boolean>. |
RemoveAsync(TEntity)
Removes the asynchronous.
Declaration
public abstract Task RemoveAsync(TEntity e)
Parameters
Type | Name | Description |
---|---|---|
TEntity | e | The e. |
Returns
Type | Description |
---|---|
Task | Task. |
RetrieveItemsAsync(CancellationToken)
Retrieves the items asynchronous.
Declaration
public abstract Task<List<TEntity>> RetrieveItemsAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | The cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
Task<List<TEntity>> | Task<List<TEntity>>. |
SearchAsync(Object)
Searches the asynchronous.
Declaration
public abstract Task SearchAsync(object e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | e | The e. |
Returns
Type | Description |
---|---|
Task | Task. |
SetSelectedItemAsync(TEntity)
Sets the selected item.
Declaration
public virtual Task SetSelectedItemAsync(TEntity e)
Parameters
Type | Name | Description |
---|---|---|
TEntity | e | The e. |
Returns
Type | Description |
---|---|
Task |
SubmitAsync(TEntity, Boolean)
Submits the asynchronous.
Declaration
public virtual Task SubmitAsync(TEntity e, bool validateUnderlayingProperties = true)
Parameters
Type | Name | Description |
---|---|---|
TEntity | e | The e. |
System.Boolean | validateUnderlayingProperties |
Returns
Type | Description |
---|---|
Task | Task. |
Events
View SourceSubmitted
Occurs when [submitted].
Declaration
public event EventHandler<SubmitEventArgs<TEntity>> Submitted
Event Type
Type | Description |
---|---|
EventHandler<SubmitEventArgs<TEntity>> |