Class ViewModel
Class ViewModel. Implements the ObservableClass Implements the IViewModel
Inheritance
Implements
Inherited Members
Namespace: ISynergy.Framework.Mvvm.ViewModels
Assembly: ISynergy.Framework.Mvvm.dll
Syntax
public abstract class ViewModel : ObservableClass, IViewModel, IObservableClass, IBindable, ICleanup
Constructors
View SourceViewModel(IContext, IBaseCommonServices, ILogger, Boolean)
Initializes a new instance of the ViewModel class.
Declaration
protected ViewModel(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 | The validation. |
Properties
View SourceBaseCommonServices
Gets the base common services.
Declaration
public IBaseCommonServices BaseCommonServices { get; }
Property Value
Type | Description |
---|---|
IBaseCommonServices | The base common services. |
CanClose
Gets or sets a value indicating whether this instance can close.
Declaration
public bool CanClose { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
CloseCommand
Gets or sets the close command.
Declaration
public RelayCommand CloseCommand { get; protected set; }
Property Value
Type | Description |
---|---|
RelayCommand | The close command. |
Context
Gets the context.
Declaration
public IContext Context { get; }
Property Value
Type | Description |
---|---|
IContext | The context. |
IsCancelled
Gets or sets a value indicating whether this instance is cancelled.
Declaration
public bool IsCancelled { get; protected set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
IsInitialized
Gets or sets the IsInitialized property value.
Declaration
public bool IsInitialized { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
IsRefreshing
Gets or sets the IsRefreshing property value.
Declaration
public bool IsRefreshing { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Logger
Gets the logger.
Declaration
public ILogger Logger { get; }
Property Value
Type | Description |
---|---|
ILogger | The logger. |
Parameter
Gets or sets the Parameter property value.
Declaration
public object Parameter { get; set; }
Property Value
Type | Description |
---|---|
System.Object |
Title
Gets or sets the Title property value.
Declaration
public virtual string Title { get; set; }
Property Value
Type | Description |
---|---|
System.String | The title. |
Methods
View SourceCancel()
Cancels the synchronous.
Declaration
public virtual void Cancel()
Cleanup()
Cleans up the instance, for example by saving its state, removing resources, etc...
Declaration
public virtual void Cleanup()
Close()
Closes the synchronous.
Declaration
public virtual void Close()
Dispose(Boolean)
Releases unmanaged and - optionally - managed resources.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
|
GetEnumDescription(Enum)
Gets the enum description.
Declaration
public string GetEnumDescription(Enum value)
Parameters
Type | Name | Description |
---|---|---|
Enum | value | The value. |
Returns
Type | Description |
---|---|
System.String | System.String. |
InitializeAsync()
Initializes the asynchronous.
Declaration
public virtual Task InitializeAsync()
Returns
Type | Description |
---|---|
Task | Task. |
OnCancelled(EventArgs)
Handles the Cancelled event.
Declaration
public virtual void OnCancelled(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
EventArgs | e | The |
OnClosed(EventArgs)
Handles the Closed event.
Declaration
public virtual void OnClosed(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
EventArgs | e | The |
OnPropertyChanged(Object, PropertyChangedEventArgs)
Handles the PropertyChanged event.
Declaration
public virtual void OnPropertyChanged(object sender, PropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The sender. |
PropertyChangedEventArgs | e | The |
Events
View SourceCancelled
Occurs when [cancelled].
Declaration
public event EventHandler Cancelled
Event Type
Type | Description |
---|---|
EventHandler |
Closed
Occurs when [closed].
Declaration
public event EventHandler Closed
Event Type
Type | Description |
---|---|
EventHandler |