Add InstallPath, DownloadPath and ModlistImage to StateContainer.

This commit is contained in:
Unnoen 2022-01-27 18:30:04 +11:00
parent 100b08a1c5
commit d790463a27
No known key found for this signature in database
GPG Key ID: 8F8E42252BA20553
2 changed files with 33 additions and 0 deletions

View File

@ -17,9 +17,18 @@ public interface IStateContainer
IObservable<AbsolutePath> ModlistPathObservable { get; }
AbsolutePath ModlistPath { get; set; }
IObservable<AbsolutePath> InstallPathObservable { get; }
AbsolutePath InstallPath { get; set; }
IObservable<AbsolutePath> DownloadPathObservable { get; }
AbsolutePath DownloadPath { get; set; }
IObservable<ModList?> ModlistObservable { get; }
ModList? Modlist { get; set; }
IObservable<string> ModlistImageObservable { get; }
string ModlistImage { get; set; }
IObservable<InstallState> InstallStateObservable { get; }
InstallState InstallState { get; set; }

View File

@ -55,6 +55,22 @@ public class StateContainer : IStateContainer
set => _modlistPathObservable.Value = value;
}
private readonly CustomObservable<AbsolutePath> _installPathObservable = new(AbsolutePath.Empty);
public IObservable<AbsolutePath> InstallPathObservable => _installPathObservable;
public AbsolutePath InstallPath
{
get => _installPathObservable.Value;
set => _installPathObservable.Value = value;
}
private readonly CustomObservable<AbsolutePath> _downloadPathObservable = new(AbsolutePath.Empty);
public IObservable<AbsolutePath> DownloadPathObservable => _downloadPathObservable;
public AbsolutePath DownloadPath
{
get => _downloadPathObservable.Value;
set => _downloadPathObservable.Value = value;
}
private readonly CustomObservable<ModList?> _modlistObservable = new(null);
public IObservable<ModList?> ModlistObservable => _modlistObservable;
public ModList? Modlist
@ -62,6 +78,14 @@ public class StateContainer : IStateContainer
get => _modlistObservable.Value;
set => _modlistObservable.Value = value;
}
private readonly CustomObservable<string> _modlistImageObservable = new(string.Empty);
public IObservable<string> ModlistImageObservable => _modlistImageObservable;
public string ModlistImage
{
get => _modlistImageObservable.Value;
set => _modlistImageObservable.Value = value;
}
private readonly CustomObservable<InstallState> _installStateObservable = new(InstallState.Waiting);
public IObservable<InstallState> InstallStateObservable => _installStateObservable;