-
Notifications
You must be signed in to change notification settings - Fork 808
Expand file tree
/
Copy pathIInstallationOptions.cs
More file actions
63 lines (55 loc) · 2.09 KB
/
IInstallationOptions.cs
File metadata and controls
63 lines (55 loc) · 2.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
using System.Runtime.InteropServices;
using UniGetUI.PackageEngine.Enums;
using UniGetUI.PackageEngine.Serializable;
namespace UniGetUI.PackageEngine.Interfaces
{
public interface IInstallationOptions
{
public bool SkipHashCheck { get; set; }
public bool InteractiveInstallation { get; set; }
public bool RunAsAdministrator { get; set; }
public string Version { get; set; }
public bool SkipMinorUpdates { get; set; }
public Architecture? Architecture { get; set; }
public PackageScope? InstallationScope { get; set; }
public List<string> CustomParameters { get; set; }
public bool RemoveDataOnUninstall { get; set; }
public bool PreRelease { get; set; }
public string CustomInstallLocation { get; set; }
public IPackage Package { get; }
/// <summary>
/// Loads and applies the options from the given SerializableInstallationOptions object to the current object.
/// </summary>
public void FromSerializable(SerializableInstallationOptions options);
/// <summary>
/// Returns a SerializableInstallationOptions object containing the options of the current instance.
/// </summary>
public SerializableInstallationOptions AsSerializable();
/// <summary>
/// Saves the current options to disk, asynchronously.
/// </summary>
public async Task SaveToDiskAsync()
{
await Task.Run(SaveToDisk);
}
/// <summary>
/// Loads the options from disk, asynchronously.
/// </summary>
public async Task LoadFromDiskAsync()
{
await Task.Run(LoadFromDisk);
}
/// <summary>
/// Saves the current options to disk.
/// </summary>
public void SaveToDisk();
/// <summary>
/// Loads the options from disk.
/// </summary>
protected void LoadFromDisk();
/// <summary>
/// Returns a string representation of the current options.
/// </summary>
public string ToString();
}
}