Generated by DocFX

Class ViewModel

Class ViewModel. Implements the ObservableClass Implements the IViewModel

Inheritance
System.Object
ObservableClass
ViewModel
ViewModelBlade<TEntity>
ViewModelBladeView<TEntity>
ViewModelDialog<TEntity>
ViewModelNavigation<TEntity>
ViewModelSummary<TEntity>
BaseShellViewModel
Implements
IViewModel
IObservableClass
IBindable
INotifyPropertyChanged
IDisposable
IDataErrorInfo
INotifyDataErrorInfo
ICleanup
Inherited Members
ObservableClass.AutomaticValidationTrigger
ObservableClass.Properties
ObservableClass.Validator
ObservableClass.IsDirty
ObservableClass.IsValid
ObservableClass.Equals(Object)
ObservableClass.GetHashCode()
ObservableClass.GetValue<T>(String)
ObservableClass.SetValue<T>(T, String)
ObservableClass.SetValue<T>(T, T, String)
ObservableClass.ClearErrors()
ObservableClass.Validate(Boolean)
ObservableClass.Revert()
ObservableClass.MarkAsClean()
ObservableClass.AddValidationError(String, String)
ObservableClass.Errors
ObservableClass.Error
ObservableClass.Item[String]
ObservableClass.ErrorsChanged
ObservableClass.OnErrorsChanged(String)
ObservableClass.GetErrors(String)
ObservableClass.HasErrors
ObservableClass.PropertyChanged
ObservableClass.OnPropertyChanged(String)
ObservableClass.Dispose()
Namespace: ISynergy.Framework.Mvvm.ViewModels
Assembly: ISynergy.Framework.Mvvm.dll
Syntax
public abstract class ViewModel : ObservableClass, IViewModel, IObservableClass, IBindable, ICleanup

Constructors

View Source

ViewModel(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 Source

BaseCommonServices

Gets the base common services.

Declaration
public IBaseCommonServices BaseCommonServices { get; }
Property Value
Type Description
IBaseCommonServices

The base common services.

View Source

CanClose

Gets or sets a value indicating whether this instance can close.

Declaration
public bool CanClose { get; set; }
Property Value
Type Description
System.Boolean

true if this instance can close; otherwise, false.

View Source

CloseCommand

Gets or sets the close command.

Declaration
public RelayCommand CloseCommand { get; protected set; }
Property Value
Type Description
RelayCommand

The close command.

View Source

Context

Gets the context.

Declaration
public IContext Context { get; }
Property Value
Type Description
IContext

The context.

View Source

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

true if this instance is cancelled; otherwise, false.

View Source

IsInitialized

Gets or sets the IsInitialized property value.

Declaration
public bool IsInitialized { get; set; }
Property Value
Type Description
System.Boolean

true if this instance is initialized; otherwise, false.

View Source

IsRefreshing

Gets or sets the IsRefreshing property value.

Declaration
public bool IsRefreshing { get; set; }
Property Value
Type Description
System.Boolean
View Source

Logger

Gets the logger.

Declaration
public ILogger Logger { get; }
Property Value
Type Description
ILogger

The logger.

View Source

Parameter

Gets or sets the Parameter property value.

Declaration
public object Parameter { get; set; }
Property Value
Type Description
System.Object
View Source

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 Source

Cancel()

Cancels the synchronous.

Declaration
public virtual void Cancel()
View Source

Cleanup()

Cleans up the instance, for example by saving its state, removing resources, etc...

Declaration
public virtual void Cleanup()
View Source

Close()

Closes the synchronous.

Declaration
public virtual void Close()
View Source

Dispose(Boolean)

Releases unmanaged and - optionally - managed resources.

Declaration
protected override void Dispose(bool disposing)
Parameters
Type Name Description
System.Boolean disposing

true to release both managed and unmanaged resources; false to release only unmanaged resources.

View Source

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.

View Source

InitializeAsync()

Initializes the asynchronous.

Declaration
public virtual Task InitializeAsync()
Returns
Type Description
Task

Task.

View Source

OnCancelled(EventArgs)

Handles the Cancelled event.

Declaration
public virtual void OnCancelled(EventArgs e)
Parameters
Type Name Description
EventArgs e

The instance containing the event data.

View Source

OnClosed(EventArgs)

Handles the Closed event.

Declaration
public virtual void OnClosed(EventArgs e)
Parameters
Type Name Description
EventArgs e

The instance containing the event data.

View Source

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 instance containing the event data.

Events

View Source

Cancelled

Occurs when [cancelled].

Declaration
public event EventHandler Cancelled
Event Type
Type Description
EventHandler
View Source

Closed

Occurs when [closed].

Declaration
public event EventHandler Closed
Event Type
Type Description
EventHandler

Implements

IViewModel
IObservableClass
IBindable
INotifyPropertyChanged
IDisposable
IDataErrorInfo
INotifyDataErrorInfo
ICleanup

Extension Methods

Matrix.Replace<T>(T, Object, Object)
Matrix.IsEqual(Object, Object, Decimal, Decimal)
EntityBaseExtensions.HasProperty(Object, String)
ArrayExtensions.Concatenate<T>(T, T[])
CollectionExtensions.FromHierarchy<TSource>(TSource, Func<TSource, TSource>, Func<TSource, Boolean>)
CollectionExtensions.FromHierarchy<TSource>(TSource, Func<TSource, TSource>)
ObjectExtensions.Clone<T>(T)
ObjectExtensions.To<T>(Object)
ObjectExtensions.To(Object, Type)
ObjectExtensions.HasMethod(Object, String)
ObjectExtensions.AddressOf<T>(T)
ReflectionExtensions.GetIdentityValue<T>(T)
ReflectionExtensions.GetIdentityValue<T, TResult>(T)
ReflectionExtensions.GetIdentityProperty<T>(T)
ReflectionExtensions.HasIdentityProperty<T>(T)
ReflectionExtensions.GetPropertyValue<T, TResult>(T, String, TResult)
ReflectionExtensions.GetPropertyInfo<T, TValue>(T, Expression<Func<T, TValue>>)
ReflectionExtensions.GetTitleValue<T>(T)
ReflectionExtensions.HasParentIdentityProperty<T>(T)
ReflectionExtensions.GetParentIdentityProperty<T>(T)
ReflectionExtensions.IsFreeApplication<T>(T)

See Also

ObservableClass
IViewModel