2021-10-27 04:28:01 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Reactive.Disposables;
|
|
|
|
|
using ReactiveUI;
|
2021-09-27 12:42:46 +00:00
|
|
|
|
using ReactiveUI.Validation.Helpers;
|
|
|
|
|
|
2021-10-23 16:51:17 +00:00
|
|
|
|
namespace Wabbajack.App.ViewModels;
|
|
|
|
|
|
2021-10-27 04:28:01 +00:00
|
|
|
|
public class ViewModelBase : ReactiveValidationObject, IActivatableViewModel, IDisposable
|
2021-09-27 12:42:46 +00:00
|
|
|
|
{
|
2021-10-27 04:28:01 +00:00
|
|
|
|
protected readonly CompositeDisposable VMDisposables = new();
|
2021-10-23 16:51:17 +00:00
|
|
|
|
public ViewModelActivator Activator { get; protected set; }
|
2021-10-27 04:28:01 +00:00
|
|
|
|
|
|
|
|
|
public void Dispose()
|
|
|
|
|
{
|
|
|
|
|
VMDisposables.Dispose();
|
|
|
|
|
Activator.Dispose();
|
|
|
|
|
}
|
2021-10-23 16:51:17 +00:00
|
|
|
|
}
|