Class ViewModelDialog<TEntity>
Class ViewModelDialog. Implements the ViewModel Implements the IViewModelDialog<TEntity>
Inheritance
System.Object
    
    
    ViewModelDialog<TEntity>
      
      
      
      
      
      
      
  Implements
IViewModelDialog<TEntity>
    IViewModelSelectedItem<TEntity>
    
    
    
    INotifyPropertyChanged
    IDisposable
    IDataErrorInfo
    INotifyDataErrorInfo
    
  Inherited Members
Namespace: ISynergy.Framework.Mvvm.ViewModels
Assembly: ISynergy.Framework.Mvvm.dll
Syntax
public abstract class ViewModelDialog<TEntity> : ViewModel, IViewModelDialog<TEntity>, IViewModelSelectedItem<TEntity>, IViewModel, IObservableClass, IBindable, ICleanupType Parameters
| Name | Description | 
|---|---|
| TEntity | The type of the t entity. | 
Constructors
View SourceViewModelDialog(IContext, IBaseCommonServices, ILogger, Boolean)
Initializes a new instance of the ViewModelDialog<TEntity> class.
Declaration
protected ViewModelDialog(IContext context, IBaseCommonServices commonServices, ILogger logger, bool automaticValidation = false)Parameters
| Type | Name | Description | 
|---|---|---|
| IContext | context | The context. | 
| IBaseCommonServices | commonServices | The common services. | 
| ILogger | logger | The logger factory. | 
| System.Boolean | automaticValidation | 
Properties
View SourceIsUpdate
Gets or sets the IsUpdate property value.
Declaration
public bool IsUpdate { get; set; }Property Value
| Type | Description | 
|---|---|
| System.Boolean | 
 | 
SelectedItem
Gets or sets the SelectedItem property value.
Declaration
public TEntity SelectedItem { get; set; }Property Value
| Type | Description | 
|---|---|
| TEntity | The selected item. | 
SubmitCommand
Gets the submit command.
Declaration
public AsyncRelayCommand<TEntity> SubmitCommand { get; }Property Value
| Type | Description | 
|---|---|
| AsyncRelayCommand<TEntity> | The submit command. | 
Methods
View SourceApplyQueryAttributes(IDictionary<String, Object>)
Declaration
public void ApplyQueryAttributes(IDictionary<string, object> query)Parameters
| Type | Name | Description | 
|---|---|---|
| IDictionary<System.String, System.Object> | query | 
Cleanup()
Declaration
public override void Cleanup()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. | 
SetSelectedItemAsync(TEntity)
Sets the selected item.
Declaration
public virtual Task SetSelectedItemAsync(TEntity entity)Parameters
| Type | Name | Description | 
|---|---|---|
| TEntity | entity | The entity. | 
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>> SubmittedEvent Type
| Type | Description | 
|---|---|
| EventHandler<SubmitEventArgs<TEntity>> | 
Implements
      INotifyPropertyChanged
  
  
      IDisposable
  
  
      IDataErrorInfo
  
  
      INotifyDataErrorInfo
  
  
  Extension Methods
      CollectionExtensions.FromHierarchy<TSource>(TSource, Func<TSource, TSource>, Func<TSource, Boolean>)
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  See Also
IViewModelDialog<TEntity>