namespace GDNXFD.Alert.Config.ViewModel.Base { using GalaSoft.MvvmLight; using System; using System.Collections.Generic; using System.Linq; using System.Runtime.CompilerServices; using System.Text; using System.Threading.Tasks; /// /// Custom viewmodel base. /// public class VMBase : ViewModelBase, IDisposable { private bool isBusy; /// /// Set or get if the viewmodel is in busy mode (performing server petitions...) /// public bool IsBusy { get { return this.isBusy; } set { this.isBusy = value; RaisePropertyChanged(() => IsBusy); } } /// /// Internal dispose called if not overrided /// public void Dispose() { this.Dispose(true); GC.SuppressFinalize(this); } /// /// RaisePropertyChanged override to implement CallerMemberName /// /// protected override void RaisePropertyChanged([CallerMemberName]string propertyName = "") { base.RaisePropertyChanged(propertyName); } /// /// Dispose override /// /// protected virtual void Dispose(bool dispose) { } } }