6using System.Collections.Generic;
7using System.Collections.ObjectModel;
23 return _versionString;
52 public ReadOnlyCollection<WinGetLink>
Links
67 return _adminSettings;
78 if (
string.IsNullOrWhiteSpace(_versionString) &&
79 (_directories ==
null || _directories.Count <= 0) &&
80 (_links ==
null || _links.Count <= 0) &&
81 (_adminSettings ==
null || _adminSettings.Count <= 0))
96 return new WinGetInfo(
"",
new Version(0, 0),
new List<WinGetDirectory>(),
new List<WinGetLink>(),
new List<WinGetAdminSetting>());
100 private readonly
string _versionString;
101 private readonly
Version _version;
102 private readonly ReadOnlyCollection<WinGetDirectory> _directories;
103 private readonly ReadOnlyCollection<WinGetLink> _links;
104 private readonly ReadOnlyCollection<WinGetAdminSetting> _adminSettings;
120 internal WinGetInfo(
string versionString,
Version version, List<WinGetDirectory> directories, List<WinGetLink> links, List<WinGetAdminSetting> adminSettings)
122 _versionString = versionString;
124 _directories =
new ReadOnlyCollection<WinGetDirectory>(directories);
125 _links =
new ReadOnlyCollection<WinGetLink>(links);
126 _adminSettings =
new ReadOnlyCollection<WinGetAdminSetting>(adminSettings);
Represents winget related information.
ReadOnlyCollection< WinGetDirectory > Directories
Gets a collection of the winget direcories.
ReadOnlyCollection< WinGetLink > Links
Gets a collection of the winget related links.
bool IsEmpty
Gets if the object is empty.
ReadOnlyCollection< WinGetAdminSetting > AdminSettings
Gets a collection of the winget admin settings.
Version Version
Gets the version number of the winget installation.
string VersionString
Gets the version number of the winget installation as a System.String.
Interface for all winget related objects.