|
WGet.NET 4.4.1
A WinGet wrapper library for .Net.
|
The WGetNET.WinGet class offers informations about the installed winget version. More...
Public Member Functions | |
| WinGet () | |
| Initializes a new instance of the WGetNET.WinGet class. | |
| string | ExportSettings () |
| Exports the WinGet settings to a json string. | |
| async Task< string > | ExportSettingsAsync (CancellationToken cancellationToken=default) |
| Asynchronous exports the WinGet settings to a json string. | |
| void | ExportSettingsToFile (string file) |
| Exports the WinGet settings to a json and writes them to the given file. | |
| async Task | ExportSettingsToFileAsync (string file, CancellationToken cancellationToken=default) |
| Asynchronous exports the WinGet settings to a json and writes them to the given file. | |
| List< WinGetAdminSetting > | GetAdminSettings () |
| Gets all winget admin settings. | |
| async Task< List< WinGetAdminSetting > > | GetAdminSettingsAsync (CancellationToken cancellationToken=default) |
| Asynchronously gets all winget admin settings. | |
| bool | EnableAdminSetting (string settingName) |
| Enables the provided admin setting (Needs administrator rights). | |
| bool | EnableAdminSetting (WinGetAdminSetting setting) |
| Enables the provided admin setting (Needs administrator rights). | |
| async Task< bool > | EnableAdminSettingAsync (string settingName, CancellationToken cancellationToken=default) |
| Asynchronously enables the provided admin setting (Needs administrator rights). | |
| async Task< bool > | EnableAdminSettingAsync (WinGetAdminSetting setting, CancellationToken cancellationToken=default) |
| Asynchronously enables the provided admin setting (Needs administrator rights). | |
| bool | DisableAdminSetting (string settingName) |
| Disables the provided admin setting (Needs administrator rights). | |
| bool | DisableAdminSetting (WinGetAdminSetting setting) |
| Disables the provided admin setting (Needs administrator rights). | |
| async Task< bool > | DisableAdminSettingAsync (string settingName, CancellationToken cancellationToken=default) |
| Asynchronously disables the provided admin setting (Needs administrator rights). | |
| async Task< bool > | DisableAdminSettingAsync (WinGetAdminSetting setting, CancellationToken cancellationToken=default) |
| Asynchronously disables the provided admin setting (Needs administrator rights). | |
| WinGetInfo | GetInfo () |
| Gets all WinGet related data provided by the WinGet info action. | |
| async Task< WinGetInfo > | GetInfoAsync (CancellationToken cancellationToken=default) |
| Asynchronous gets all WinGet related data provided by the WinGet info action. | |
| WinGetResult | ExecuteCustom (WinGetArguments args) |
| Exectutes WinGet with the provided arguments. | |
| WinGetResult | ExecuteCustom (string args) |
| Exectutes WinGet with the provided arguments. | |
| async Task< WinGetResult > | ExecuteCustomAsync (WinGetArguments args, CancellationToken cancellationToken=default) |
| Asynchronously exectutes WinGet with the provided arguments. | |
| async Task< WinGetResult > | ExecuteCustomAsync (string args, CancellationToken cancellationToken=default) |
| Asynchronously exectutes WinGet with the provided arguments. | |
Properties | |
| bool | IsInstalled [get] |
| Gets if winget is installed on the system. | |
| bool | IsPreview [get] |
| Gets if the version of winget is a preview version. | |
| string | VersionString [get] |
| Gets the version number of the winget installation. | |
| Version | Version [get] |
| Gets the version number of the winget installation. | |
The WGetNET.WinGet class offers informations about the installed winget version.
| WGetNET.WinGet.WinGet | ( | ) |
Initializes a new instance of the WGetNET.WinGet class.
| bool WGetNET.WinGet.DisableAdminSetting | ( | string | settingName | ) |
Disables the provided admin setting (Needs administrator rights).
| settingName | Name of the admin setting to disable. |
true if the action was succesfull and false if it failed. | WGetNET.Exceptions.WinGetNotInstalledException | WinGet is not installed or not found on the system. |
| System.ArgumentNullException | A provided argument is null. |
| System.ArgumentException | A provided argument is empty. |
| System.Security.SecurityException | The current user is missing administrator privileges for this call. |
| bool WGetNET.WinGet.DisableAdminSetting | ( | WinGetAdminSetting | setting | ) |
Disables the provided admin setting (Needs administrator rights).
| setting | The WGetNET.WinGetAdminSetting to disable. |
true if the action was succesfull and false if it failed. | WGetNET.Exceptions.WinGetNotInstalledException | WinGet is not installed or not found on the system. |
| System.ArgumentNullException | A provided argument is null. |
| System.ArgumentException | A provided argument is empty. |
| System.Security.SecurityException | The current user is missing administrator privileges for this call. |
| async Task< bool > WGetNET.WinGet.DisableAdminSettingAsync | ( | string | settingName, |
| CancellationToken | cancellationToken = default ) |
Asynchronously disables the provided admin setting (Needs administrator rights).
| settingName | Name of the admin setting to disable. |
| cancellationToken | The System.Threading.CancellationToken for the System.Threading.Tasks.Task. |
true if the action was succesfull and false if it failed. | WGetNET.Exceptions.WinGetNotInstalledException | WinGet is not installed or not found on the system. |
| System.ArgumentNullException | A provided argument is null. |
| System.ArgumentException | A provided argument is empty. |
| System.Security.SecurityException | The current user is missing administrator privileges for this call. |
| async Task< bool > WGetNET.WinGet.DisableAdminSettingAsync | ( | WinGetAdminSetting | setting, |
| CancellationToken | cancellationToken = default ) |
Asynchronously disables the provided admin setting (Needs administrator rights).
| setting | The WGetNET.WinGetAdminSetting to disable. |
| cancellationToken | The System.Threading.CancellationToken for the System.Threading.Tasks.Task. |
true if the action was succesfull and false if it failed. | WGetNET.Exceptions.WinGetNotInstalledException | WinGet is not installed or not found on the system. |
| System.ArgumentNullException | A provided argument is null. |
| System.ArgumentException | A provided argument is empty. |
| System.Security.SecurityException | The current user is missing administrator privileges for this call. |
| bool WGetNET.WinGet.EnableAdminSetting | ( | string | settingName | ) |
Enables the provided admin setting (Needs administrator rights).
| settingName | Name of the admin setting to enable. |
true if the action was succesfull and false if it failed. | WGetNET.Exceptions.WinGetNotInstalledException | WinGet is not installed or not found on the system. |
| System.ArgumentNullException | A provided argument is null. |
| System.ArgumentException | A provided argument is empty. |
| System.Security.SecurityException | The current user is missing administrator privileges for this call. |
| bool WGetNET.WinGet.EnableAdminSetting | ( | WinGetAdminSetting | setting | ) |
Enables the provided admin setting (Needs administrator rights).
| setting | The WGetNET.WinGetAdminSetting to enable. |
true if the action was succesfull and false if it failed. | WGetNET.Exceptions.WinGetNotInstalledException | WinGet is not installed or not found on the system. |
| System.ArgumentNullException | A provided argument is null. |
| System.ArgumentException | A provided argument is empty. |
| System.Security.SecurityException | The current user is missing administrator privileges for this call. |
| async Task< bool > WGetNET.WinGet.EnableAdminSettingAsync | ( | string | settingName, |
| CancellationToken | cancellationToken = default ) |
Asynchronously enables the provided admin setting (Needs administrator rights).
| settingName | Name of the admin setting to enable. |
| cancellationToken | The System.Threading.CancellationToken for the System.Threading.Tasks.Task. |
true if the action was succesfull and false if it failed. | WGetNET.Exceptions.WinGetNotInstalledException | WinGet is not installed or not found on the system. |
| System.ArgumentNullException | A provided argument is null. |
| System.ArgumentException | A provided argument is empty. |
| System.Security.SecurityException | The current user is missing administrator privileges for this call. |
| async Task< bool > WGetNET.WinGet.EnableAdminSettingAsync | ( | WinGetAdminSetting | setting, |
| CancellationToken | cancellationToken = default ) |
Asynchronously enables the provided admin setting (Needs administrator rights).
| setting | The WGetNET.WinGetAdminSetting to enable. |
| cancellationToken | The System.Threading.CancellationToken for the System.Threading.Tasks.Task. |
true if the action was succesfull and false if it failed. | WGetNET.Exceptions.WinGetNotInstalledException | WinGet is not installed or not found on the system. |
| System.ArgumentNullException | A provided argument is null. |
| System.ArgumentException | A provided argument is empty. |
| System.Security.SecurityException | The current user is missing administrator privileges for this call. |
| WinGetResult WGetNET.WinGet.ExecuteCustom | ( | string | args | ) |
Exectutes WinGet with the provided arguments.
| args | A System.String containing the arguments for the WinGet process. |
| WGetNET.Exceptions.WinGetNotInstalledException | WinGet is not installed or not found on the system. |
| System.ArgumentNullException | A provided argument is null. |
| System.ArgumentException | A provided argument is empty. |
| WinGetResult WGetNET.WinGet.ExecuteCustom | ( | WinGetArguments | args | ) |
Exectutes WinGet with the provided arguments.
| args | A WGetNET.WinGetArguments object containing the arguments for the WinGet process. |
| WGetNET.Exceptions.WinGetNotInstalledException | WinGet is not installed or not found on the system. |
| System.ArgumentNullException | A provided argument is null. |
| async Task< WinGetResult > WGetNET.WinGet.ExecuteCustomAsync | ( | string | args, |
| CancellationToken | cancellationToken = default ) |
Asynchronously exectutes WinGet with the provided arguments.
| args | A System.String containing the arguments for the WinGet process. |
| cancellationToken | The System.Threading.CancellationToken for the System.Threading.Tasks.Task. |
| WGetNET.Exceptions.WinGetNotInstalledException | WinGet is not installed or not found on the system. |
| System.ArgumentNullException | A provided argument is null. |
| System.ArgumentException | A provided argument is empty. |
| async Task< WinGetResult > WGetNET.WinGet.ExecuteCustomAsync | ( | WinGetArguments | args, |
| CancellationToken | cancellationToken = default ) |
Asynchronously exectutes WinGet with the provided arguments.
| args | A WGetNET.WinGetArguments object containing the arguments for the WinGet process. |
| cancellationToken | The System.Threading.CancellationToken for the System.Threading.Tasks.Task. |
| WGetNET.Exceptions.WinGetNotInstalledException | WinGet is not installed or not found on the system. |
| System.ArgumentNullException | A provided argument is null. |
| string WGetNET.WinGet.ExportSettings | ( | ) |
Exports the WinGet settings to a json string.
| WGetNET.Exceptions.WinGetNotInstalledException | WinGet is not installed or not found on the system. |
| async Task< string > WGetNET.WinGet.ExportSettingsAsync | ( | CancellationToken | cancellationToken = default | ) |
Asynchronous exports the WinGet settings to a json string.
| cancellationToken | The System.Threading.CancellationToken for the System.Threading.Tasks.Task. |
| WGetNET.Exceptions.WinGetNotInstalledException | WinGet is not installed or not found on the system. |
| void WGetNET.WinGet.ExportSettingsToFile | ( | string | file | ) |
Exports the WinGet settings to a json and writes them to the given file.
| file | The file for the export. |
true if the action was succesfull, and false if it failed. | WGetNET.Exceptions.WinGetNotInstalledException | WinGet is not installed or not found on the system. |
| System.ArgumentNullException | A provided argument is null. |
| System.ArgumentException | A provided argument is empty.-or-The path contains one or more invalid characters as defined by System.IO.Path.InvalidPathChars. |
| System.IO.DirectoryNotFoundException | The directory root does not exist. |
| System.IO.PathTooLongException | The specified path, file name, or both exceed the system-defined maximum length. |
| System.UnauthorizedAccessException | The caller does not have the required permission. |
| System.IO.IOException | An I/O error occurred while opening the file |
| System.NotSupportedException | Path is in an invalid format. |
| System.Security.SecurityException | The caller does not have the required permission. |
| async Task WGetNET.WinGet.ExportSettingsToFileAsync | ( | string | file, |
| CancellationToken | cancellationToken = default ) |
Asynchronous exports the WinGet settings to a json and writes them to the given file.
| file | The file for the export. |
| cancellationToken | The System.Threading.CancellationToken for the System.Threading.Tasks.Task. |
| WGetNET.Exceptions.WinGetNotInstalledException | WinGet is not installed or not found on the system. |
| System.ArgumentNullException | A provided argument is null. |
| System.ArgumentException | A provided argument is empty.-or-The path contains one or more invalid characters as defined by System.IO.Path.InvalidPathChars. |
| System.IO.DirectoryNotFoundException | The directory root does not exist. |
| System.IO.PathTooLongException | The specified path, file name, or both exceed the system-defined maximum length. |
| System.UnauthorizedAccessException | The caller does not have the required permission. |
| System.IO.IOException | An I/O error occurred while opening the file |
| System.NotSupportedException | Path is in an invalid format. |
| System.Security.SecurityException | The caller does not have the required permission. |
| List< WinGetAdminSetting > WGetNET.WinGet.GetAdminSettings | ( | ) |
Gets all winget admin settings.
| WGetNET.Exceptions.WinGetNotInstalledException | WinGet is not installed or not found on the system. |
| async Task< List< WinGetAdminSetting > > WGetNET.WinGet.GetAdminSettingsAsync | ( | CancellationToken | cancellationToken = default | ) |
Asynchronously gets all winget admin settings.
| cancellationToken | The System.Threading.CancellationToken for the System.Threading.Tasks.Task. |
| WGetNET.Exceptions.WinGetNotInstalledException | WinGet is not installed or not found on the system. |
| WinGetInfo WGetNET.WinGet.GetInfo | ( | ) |
Gets all WinGet related data provided by the WinGet info action.
| WGetNET.Exceptions.WinGetNotInstalledException | WinGet is not installed or not found on the system. |
| async Task< WinGetInfo > WGetNET.WinGet.GetInfoAsync | ( | CancellationToken | cancellationToken = default | ) |
Asynchronous gets all WinGet related data provided by the WinGet info action.
| cancellationToken | The System.Threading.CancellationToken for the System.Threading.Tasks.Task. |
| WGetNET.Exceptions.WinGetNotInstalledException | WinGet is not installed or not found on the system. |
|
get |
|
get |
|
get |