Skip to content

Commit d3cb351

Browse files
authored
Merge pull request #26 from basicx-StrgV/develop
Merge Version 3.2.0 from develop to main
2 parents adc4784 + 76ed64a commit d3cb351

File tree

174 files changed

+16437
-5268
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

174 files changed

+16437
-5268
lines changed

README.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ https://basicx-strgv.github.io/WGet.NET/
4141
- [x] Export Settings
4242
- [x] Download package installer
4343
- [x] Manage pinned packages
44+
- [x] Access info of the WinGet installation
4445
- Other
4546
- [x] Asynchronous Execution
4647

@@ -101,20 +102,16 @@ sourceManager.AddSource("msstore", "https://storeedgefd.dsx.mp.microsoft.com/v9.
101102

102103
### Find Latest Versions of a Package:
103104

104-
Using the ***WinGetPackageManager*** class you can use the `GetInstalledPackages` capability to get the latest version of a package and then retrieve the version number from the `AvailableVersion` property.
105+
Using the ***WinGetPackageManager*** class you can use the `GetInstalledPackages` capability to get the latest version of a package and then retrieve the version number from the `AvailableVersionObject` property.
105106

106-
You would then be able to compare this to the current version of the package and determine if you need to notify users of an available upgrade.
107+
You would then be able to compare this to the current version of the package (`VersionObject` property) and determine if you need to notify users of an available upgrade.
107108

108109
```csharp
109-
Version currentPackageVersion = null;
110-
Version latestPackageVersion = null;
111110
WinGetPackageManager packageManager = new WinGetPackageManager();
112111
string packageId = "nkdAgility.AzureDevOpsMigrationTools";
113-
var package = packageManager.GetInstalledPackages(packageId, true).FirstOrDefault();
114-
currentPackageVersion = new Version(package.Version);
115-
latestPackageVersion = new Version(package.AvailableVersion);
112+
WinGetPackage package = packageManager.GetInstalledPackages(packageId, true).FirstOrDefault();
116113

117-
if (latestPackageVersion > currentPackageVersion)
114+
if (package.AvailableVersionObject > package.VersionObject)
118115
{
119116
Console.WriteLine("You are currently running version {currentVersion} and a newer version ({latestVersion}) is available. You should update now using Winget command 'winget {packageId}' from the Windows Terminal.", currentPackageVersion, latestPackageVersion, packageId);
120117
}

docs/annotated.html

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<tbody>
2626
<tr id="projectrow">
2727
<td id="projectalign">
28-
<div id="projectname">WGet.NET<span id="projectnumber">&#160;3.1.0</span>
28+
<div id="projectname">WGet.NET<span id="projectnumber">&#160;3.2.0</span>
2929
</div>
3030
<div id="projectbrief">A WinGet wrapper library for .Net.</div>
3131
</td>
@@ -95,16 +95,19 @@
9595
<div class="contents">
9696
<div class="textblock">Here are the classes, structs, unions and interfaces with brief descriptions:</div><div class="directory">
9797
<div class="levels">[detail level <span onclick="javascript:toggleLevel(1);">1</span><span onclick="javascript:toggleLevel(2);">2</span>]</div><table class="directory">
98-
<tr id="row_0_" class="even"><td class="entry"><span style="width:0px;display:inline-block;">&#160;</span><span id="arr_0_" class="arrow" onclick="toggleFolder('0_')">&#9660;</span><span class="icona"><span class="icon">N</span></span><a class="el" href="d3/d8b/a00059.html" target="_self">WGetNET</a></td><td class="desc"></td></tr>
99-
<tr id="row_0_0_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d9/dec/a00090.html" target="_self">WinGetActionFailedException</a></td><td class="desc">Exception that gets thrown if a winget action failed </td></tr>
100-
<tr id="row_0_1_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="dc/d54/a00094.html" target="_self">WinGetFeatureNotSupportedException</a></td><td class="desc">Exception that gets thrown if a winget feature is not supportet in the installed winget version </td></tr>
101-
<tr id="row_0_2_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d9/da4/a00078.html" target="_self">WinGetInfo</a></td><td class="desc">The <a class="el" href="d9/da4/a00078.html" title="The WGetNET.WinGetInfo class offers informations about the installed winget version.">WGetNET.WinGetInfo</a> class offers informations about the installed winget version </td></tr>
102-
<tr id="row_0_3_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d1/d44/a00098.html" target="_self">WinGetNotInstalledException</a></td><td class="desc">Exception that gets thrown if winget is not installed </td></tr>
103-
<tr id="row_0_4_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d7/d12/a00126.html" target="_self">WinGetPackage</a></td><td class="desc">Represents a winget package </td></tr>
104-
<tr id="row_0_5_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d4/d63/a00082.html" target="_self">WinGetPackageManager</a></td><td class="desc">The <a class="el" href="d4/d63/a00082.html" title="The WGetNET.WinGetPackageManager class offers methods to manage packages with winget.">WGetNET.WinGetPackageManager</a> class offers methods to manage packages with winget </td></tr>
105-
<tr id="row_0_6_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d6/db3/a00130.html" target="_self">WinGetPinnedPackage</a></td><td class="desc">Represents a winget pinned package </td></tr>
106-
<tr id="row_0_7_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="de/d76/a00134.html" target="_self">WinGetSource</a></td><td class="desc">Represents a winget source </td></tr>
107-
<tr id="row_0_8_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="da/d2a/a00086.html" target="_self">WinGetSourceManager</a></td><td class="desc">The <a class="el" href="da/d2a/a00086.html" title="The WGetNET.WinGetSourceManager class offers methods to manage the sources used by winget.">WGetNET.WinGetSourceManager</a> class offers methods to manage the sources used by winget </td></tr>
98+
<tr id="row_0_" class="even"><td class="entry"><span style="width:0px;display:inline-block;">&#160;</span><span id="arr_0_" class="arrow" onclick="toggleFolder('0_')">&#9660;</span><span class="icona"><span class="icon">N</span></span><a class="el" href="db/db6/a00074.html" target="_self">WGetNET</a></td><td class="desc"></td></tr>
99+
<tr id="row_0_0_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d3/d32/a00105.html" target="_self">WinGetActionFailedException</a></td><td class="desc">Exception that gets thrown if a winget action failed </td></tr>
100+
<tr id="row_0_1_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="da/ddb/a00145.html" target="_self">WinGetAdminOption</a></td><td class="desc">Represents a winget admin settings entry </td></tr>
101+
<tr id="row_0_2_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="da/d1e/a00149.html" target="_self">WinGetData</a></td><td class="desc">Represents WinGet related data </td></tr>
102+
<tr id="row_0_3_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="dd/d42/a00109.html" target="_self">WinGetFeatureNotSupportedException</a></td><td class="desc">Exception that gets thrown if a winget feature is not supportet in the installed winget version </td></tr>
103+
<tr id="row_0_4_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d4/d7d/a00093.html" target="_self">WinGetInfo</a></td><td class="desc">The <a class="el" href="d4/d7d/a00093.html" title="The WGetNET.WinGetInfo class offers informations about the installed winget version.">WGetNET.WinGetInfo</a> class offers informations about the installed winget version </td></tr>
104+
<tr id="row_0_5_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="da/d01/a00153.html" target="_self">WinGetInfoEntry</a></td><td class="desc">Represents a basic WinGet info entry </td></tr>
105+
<tr id="row_0_6_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d3/d00/a00113.html" target="_self">WinGetNotInstalledException</a></td><td class="desc">Exception that gets thrown if winget is not installed </td></tr>
106+
<tr id="row_0_7_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d1/db7/a00157.html" target="_self">WinGetPackage</a></td><td class="desc">Represents a winget package </td></tr>
107+
<tr id="row_0_8_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d1/d84/a00097.html" target="_self">WinGetPackageManager</a></td><td class="desc">The <a class="el" href="d1/d84/a00097.html" title="The WGetNET.WinGetPackageManager class offers methods to manage packages with winget.">WGetNET.WinGetPackageManager</a> class offers methods to manage packages with winget </td></tr>
108+
<tr id="row_0_9_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d6/d7d/a00161.html" target="_self">WinGetPinnedPackage</a></td><td class="desc">Represents a winget pinned package </td></tr>
109+
<tr id="row_0_10_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d0/d48/a00165.html" target="_self">WinGetSource</a></td><td class="desc">Represents a winget source </td></tr>
110+
<tr id="row_0_11_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d4/d3a/a00101.html" target="_self">WinGetSourceManager</a></td><td class="desc">The <a class="el" href="d4/d3a/a00101.html" title="The WGetNET.WinGetSourceManager class offers methods to manage the sources used by winget.">WGetNET.WinGetSourceManager</a> class offers methods to manage the sources used by winget </td></tr>
108111
</table>
109112
</div><!-- directory -->
110113
</div><!-- contents -->

docs/annotated_dup.js

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
var annotated_dup =
22
[
3-
[ "WGetNET", "d3/d8b/a00059.html", [
4-
[ "WinGetActionFailedException", "d9/dec/a00090.html", "d9/dec/a00090" ],
5-
[ "WinGetFeatureNotSupportedException", "dc/d54/a00094.html", "dc/d54/a00094" ],
6-
[ "WinGetInfo", "d9/da4/a00078.html", "d9/da4/a00078" ],
7-
[ "WinGetNotInstalledException", "d1/d44/a00098.html", "d1/d44/a00098" ],
8-
[ "WinGetPackage", "d7/d12/a00126.html", "d7/d12/a00126" ],
9-
[ "WinGetPackageManager", "d4/d63/a00082.html", "d4/d63/a00082" ],
10-
[ "WinGetPinnedPackage", "d6/db3/a00130.html", "d6/db3/a00130" ],
11-
[ "WinGetSource", "de/d76/a00134.html", "de/d76/a00134" ],
12-
[ "WinGetSourceManager", "da/d2a/a00086.html", "da/d2a/a00086" ]
3+
[ "WGetNET", "db/db6/a00074.html", [
4+
[ "WinGetActionFailedException", "d3/d32/a00105.html", "d3/d32/a00105" ],
5+
[ "WinGetAdminOption", "da/ddb/a00145.html", "da/ddb/a00145" ],
6+
[ "WinGetData", "da/d1e/a00149.html", "da/d1e/a00149" ],
7+
[ "WinGetFeatureNotSupportedException", "dd/d42/a00109.html", "dd/d42/a00109" ],
8+
[ "WinGetInfo", "d4/d7d/a00093.html", "d4/d7d/a00093" ],
9+
[ "WinGetInfoEntry", "da/d01/a00153.html", "da/d01/a00153" ],
10+
[ "WinGetNotInstalledException", "d3/d00/a00113.html", "d3/d00/a00113" ],
11+
[ "WinGetPackage", "d1/db7/a00157.html", "d1/db7/a00157" ],
12+
[ "WinGetPackageManager", "d1/d84/a00097.html", "d1/d84/a00097" ],
13+
[ "WinGetPinnedPackage", "d6/d7d/a00161.html", "d6/d7d/a00161" ],
14+
[ "WinGetSource", "d0/d48/a00165.html", "d0/d48/a00165" ],
15+
[ "WinGetSourceManager", "d4/d3a/a00101.html", "d4/d3a/a00101" ]
1316
] ]
1417
];

docs/classes.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<tbody>
2626
<tr id="projectrow">
2727
<td id="projectalign">
28-
<div id="projectname">WGet.NET<span id="projectnumber">&#160;3.1.0</span>
28+
<div id="projectname">WGet.NET<span id="projectnumber">&#160;3.2.0</span>
2929
</div>
3030
<div id="projectbrief">A WinGet wrapper library for .Net.</div>
3131
</td>
@@ -97,7 +97,7 @@
9797
<div class="classindex">
9898
<dl class="classindex even">
9999
<dt class="alphachar"><a id="letter_W" name="letter_W">W</a></dt>
100-
<dd><a class="el" href="d9/dec/a00090.html">WinGetActionFailedException</a> (<a class="el" href="d3/d8b/a00059.html">WGetNET</a>)</dd><dd><a class="el" href="dc/d54/a00094.html">WinGetFeatureNotSupportedException</a> (<a class="el" href="d3/d8b/a00059.html">WGetNET</a>)</dd><dd><a class="el" href="d9/da4/a00078.html">WinGetInfo</a> (<a class="el" href="d3/d8b/a00059.html">WGetNET</a>)</dd><dd><a class="el" href="d1/d44/a00098.html">WinGetNotInstalledException</a> (<a class="el" href="d3/d8b/a00059.html">WGetNET</a>)</dd><dd><a class="el" href="d7/d12/a00126.html">WinGetPackage</a> (<a class="el" href="d3/d8b/a00059.html">WGetNET</a>)</dd><dd><a class="el" href="d4/d63/a00082.html">WinGetPackageManager</a> (<a class="el" href="d3/d8b/a00059.html">WGetNET</a>)</dd><dd><a class="el" href="d6/db3/a00130.html">WinGetPinnedPackage</a> (<a class="el" href="d3/d8b/a00059.html">WGetNET</a>)</dd><dd><a class="el" href="de/d76/a00134.html">WinGetSource</a> (<a class="el" href="d3/d8b/a00059.html">WGetNET</a>)</dd><dd><a class="el" href="da/d2a/a00086.html">WinGetSourceManager</a> (<a class="el" href="d3/d8b/a00059.html">WGetNET</a>)</dd></dl>
100+
<dd><a class="el" href="d3/d32/a00105.html">WinGetActionFailedException</a> (<a class="el" href="db/db6/a00074.html">WGetNET</a>)</dd><dd><a class="el" href="da/ddb/a00145.html">WinGetAdminOption</a> (<a class="el" href="db/db6/a00074.html">WGetNET</a>)</dd><dd><a class="el" href="da/d1e/a00149.html">WinGetData</a> (<a class="el" href="db/db6/a00074.html">WGetNET</a>)</dd><dd><a class="el" href="dd/d42/a00109.html">WinGetFeatureNotSupportedException</a> (<a class="el" href="db/db6/a00074.html">WGetNET</a>)</dd><dd><a class="el" href="d4/d7d/a00093.html">WinGetInfo</a> (<a class="el" href="db/db6/a00074.html">WGetNET</a>)</dd><dd><a class="el" href="da/d01/a00153.html">WinGetInfoEntry</a> (<a class="el" href="db/db6/a00074.html">WGetNET</a>)</dd><dd><a class="el" href="d3/d00/a00113.html">WinGetNotInstalledException</a> (<a class="el" href="db/db6/a00074.html">WGetNET</a>)</dd><dd><a class="el" href="d1/db7/a00157.html">WinGetPackage</a> (<a class="el" href="db/db6/a00074.html">WGetNET</a>)</dd><dd><a class="el" href="d1/d84/a00097.html">WinGetPackageManager</a> (<a class="el" href="db/db6/a00074.html">WGetNET</a>)</dd><dd><a class="el" href="d6/d7d/a00161.html">WinGetPinnedPackage</a> (<a class="el" href="db/db6/a00074.html">WGetNET</a>)</dd><dd><a class="el" href="d0/d48/a00165.html">WinGetSource</a> (<a class="el" href="db/db6/a00074.html">WGetNET</a>)</dd><dd><a class="el" href="d4/d3a/a00101.html">WinGetSourceManager</a> (<a class="el" href="db/db6/a00074.html">WGetNET</a>)</dd></dl>
101101
</div>
102102
</div><!-- contents -->
103103
</div><!-- doc-content -->

0 commit comments

Comments
 (0)