WGet.NET 4.4.1
A WinGet wrapper library for .Net.
Loading...
Searching...
No Matches
WGetNET.WinGetArguments Class Reference

Represents a winget arguments string for different winget actions. More...

Inheritance diagram for WGetNET.WinGetArguments:
WGetNET.IWinGetObject

Public Member Functions

WinGetArguments Custom (string custom)
 Adds a custom flag/parameter to the arguments.
 
WinGetArguments Query (string query)
 Adds a query to the arguments.
 
WinGetArguments Source (string source)
 Adds a source query to the arguments.
 
WinGetArguments File (string file)
 Adds a file path to the arguments.
 
WinGetArguments Directory (string directory)
 Adds a directory path to the arguments.
 
WinGetArguments Enable (string query)
 Adds a enable action to the arguments.
 
WinGetArguments Disable (string query)
 Adds a disable action to the arguments.
 
WinGetArguments Name (string name)
 Adds name data to the arguments.
 
WinGetArguments Arg (string arg)
 Adds arg (Source argument) data to the arguments.
 
WinGetArguments Type (string type)
 Adds type data to the arguments.
 
WinGetArguments Version (string version)
 Adds a version query to the arguments.
 
WinGetArguments Version (Version version)
 Adds a version query to the arguments.
 
WinGetArguments Version ()
 Adds a version query to the arguments.
 
WinGetArguments Exact ()
 Adds the '–exact' flag to the arguments.
 
WinGetArguments Silent ()
 Adds the '–silent' flag to the arguments.
 
WinGetArguments All ()
 Adds the '–all' flag to the arguments.
 
WinGetArguments IncludeUnknown ()
 Adds the '–include-unknown' flag to the arguments.
 
WinGetArguments AcceptSourceAgreements ()
 Adds the '–accept-source-agreements' flag to the arguments.
 
WinGetArguments AcceptPackageAgreements ()
 Adds the '–accept-package-agreements' flag to the arguments.
 
WinGetArguments IgnoreUnavailable ()
 Adds the '–ignore-unavailable' flag to the arguments.
 
WinGetArguments Installed ()
 Adds the '–installed' flag to the arguments.
 
WinGetArguments Blocking ()
 Adds the '–blocking' flag to the arguments.
 
WinGetArguments Force ()
 Adds the '–force' flag to the arguments.
 
WinGetArguments Info ()
 Adds the '–info' flag to the arguments.
 
override string ToString ()
 

Static Public Member Functions

static WinGetArguments WinGet ()
 Creates a new winget arguments object with no base cmd. Used for direct callin of the winget cmd with flags.
 
static WinGetArguments Settings ()
 Creates a new winget arguments object with "settings" as the base cmd.
 
static WinGetArguments SettingsExport ()
 Creates a new winget arguments object with "settings export" as the base cmd.
 
static WinGetArguments List ()
 Creates a new winget arguments object with "list" as the base cmd.
 
static WinGetArguments Search ()
 Creates a new winget arguments object with "search" as the base cmd.
 
static WinGetArguments Install ()
 Creates a new winget arguments object with "install" as the base cmd.
 
static WinGetArguments Upgrade ()
 Creates a new winget arguments object with "upgrade" as the base cmd.
 
static WinGetArguments Uninstall ()
 Creates a new winget arguments object with "uninstall" as the base cmd.
 
static WinGetArguments Download ()
 Creates a new winget arguments object with "download" as the base cmd.
 
static WinGetArguments Repair ()
 Creates a new winget arguments object with "repair" as the base cmd.
 
static WinGetArguments Export ()
 Creates a new winget arguments object with "export" as the base cmd.
 
static WinGetArguments Import ()
 Creates a new winget arguments object with "import" as the base cmd.
 
static WinGetArguments Hash ()
 Creates a new winget arguments object with "hash" as the base cmd.
 
static WinGetArguments PinList ()
 Creates a new winget arguments object with "pin list" as the base cmd.
 
static WinGetArguments PinAdd ()
 Creates a new winget arguments object with "pin add" as the base cmd.
 
static WinGetArguments PinRemove ()
 Creates a new winget arguments object with "pin remove" as the base cmd.
 
static WinGetArguments PinReset ()
 Creates a new winget arguments object with "pin reset" as the base cmd.
 
static WinGetArguments SourceAdd ()
 Creates a new winget arguments object with "source add" as the base cmd.
 
static WinGetArguments SourceRemove ()
 Creates a new winget arguments object with "source remove" as the base cmd.
 
static WinGetArguments SourceUpdate ()
 Creates a new winget arguments object with "source update" as the base cmd.
 
static WinGetArguments SourceReset ()
 Creates a new winget arguments object with "source reset" as the base cmd.
 
static WinGetArguments SourceExport ()
 Creates a new winget arguments object with "source export" as the base cmd.
 
static WinGetArguments CustomCmd (string cmd)
 Creates a new winget arguments object with a custom base cmd.
 

Properties

string Arguments [get]
 Gets the generated arguments.
 
bool IsEmpty [get]
 Gets if the object is empty.
 
- Properties inherited from WGetNET.IWinGetObject

Detailed Description

Represents a winget arguments string for different winget actions.

Used to easily generate arguments for winget execution.

Definition at line 16 of file WinGetArguments.cs.

Member Function Documentation

◆ AcceptPackageAgreements()

WinGetArguments WGetNET.WinGetArguments.AcceptPackageAgreements ( )

Adds the '–accept-package-agreements' flag to the arguments.

Returns
The updated WGetNET.WinGetArguments object.

Definition at line 751 of file WinGetArguments.cs.

◆ AcceptSourceAgreements()

WinGetArguments WGetNET.WinGetArguments.AcceptSourceAgreements ( )

Adds the '–accept-source-agreements' flag to the arguments.

Returns
The updated WGetNET.WinGetArguments object.

Definition at line 739 of file WinGetArguments.cs.

◆ All()

WinGetArguments WGetNET.WinGetArguments.All ( )

Adds the '–all' flag to the arguments.

Returns
The updated WGetNET.WinGetArguments object.

Definition at line 715 of file WinGetArguments.cs.

◆ Arg()

WinGetArguments WGetNET.WinGetArguments.Arg ( string arg)

Adds arg (Source argument) data to the arguments.

Mainly used for Source based actions.

Parameters
argA System.String containing the arg (Source argument) to add to the arguments.
Returns
The updated WGetNET.WinGetArguments object.
Exceptions
System.ArgumentNullExceptionA provided argument is null.
System.ArgumentExceptionA provided argument is empty.

Definition at line 596 of file WinGetArguments.cs.

◆ Blocking()

WinGetArguments WGetNET.WinGetArguments.Blocking ( )

Adds the '–blocking' flag to the arguments.

Returns
The updated WGetNET.WinGetArguments object.

Definition at line 787 of file WinGetArguments.cs.

◆ Custom()

WinGetArguments WGetNET.WinGetArguments.Custom ( string custom)

Adds a custom flag/parameter to the arguments.

Parameters
customThe System.String that should be added to the arguments.
Returns
The updated WGetNET.WinGetArguments object.
Exceptions
System.ArgumentNullExceptionA provided argument is null.
System.ArgumentExceptionA provided argument is empty.

Definition at line 364 of file WinGetArguments.cs.

◆ CustomCmd()

static WinGetArguments WGetNET.WinGetArguments.CustomCmd ( string cmd)
static

Creates a new winget arguments object with a custom base cmd.

Parameters
cmdA System.String containing the custom cmd.
Returns
The created WGetNET.WinGetArguments object.
Exceptions
System.ArgumentNullExceptionA provided argument is null.
System.ArgumentExceptionA provided argument is empty.

Definition at line 331 of file WinGetArguments.cs.

◆ Directory()

WinGetArguments WGetNET.WinGetArguments.Directory ( string directory)

Adds a directory path to the arguments.

Behavior depends on base cmd. If the base cmd does not need a directory, the function will do nothing.

Parameters
directoryThe System.String that contains the directory.
Returns
The updated WGetNET.WinGetArguments object.
Exceptions
System.ArgumentNullExceptionA provided argument is null.
System.ArgumentExceptionA provided argument is empty.

Definition at line 477 of file WinGetArguments.cs.

◆ Disable()

WinGetArguments WGetNET.WinGetArguments.Disable ( string query)

Adds a disable action to the arguments.

Parameters
queryA System.String containing the option to disable.
Returns
The updated WGetNET.WinGetArguments object.
Exceptions
System.ArgumentNullExceptionA provided argument is null.
System.ArgumentExceptionA provided argument is empty.

Definition at line 544 of file WinGetArguments.cs.

◆ Download()

static WinGetArguments WGetNET.WinGetArguments.Download ( )
static

Creates a new winget arguments object with "download" as the base cmd.

Returns
The created WGetNET.WinGetArguments object.

Definition at line 168 of file WinGetArguments.cs.

◆ Enable()

WinGetArguments WGetNET.WinGetArguments.Enable ( string query)

Adds a enable action to the arguments.

Parameters
queryA System.String containing the option to enable.
Returns
The updated WGetNET.WinGetArguments object.
Exceptions
System.ArgumentNullExceptionA provided argument is null.
System.ArgumentExceptionA provided argument is empty.

Definition at line 521 of file WinGetArguments.cs.

◆ Exact()

WinGetArguments WGetNET.WinGetArguments.Exact ( )

Adds the '–exact' flag to the arguments.

Returns
The updated WGetNET.WinGetArguments object.

Definition at line 691 of file WinGetArguments.cs.

◆ Export()

static WinGetArguments WGetNET.WinGetArguments.Export ( )
static

Creates a new winget arguments object with "export" as the base cmd.

Returns
The created WGetNET.WinGetArguments object.

Definition at line 190 of file WinGetArguments.cs.

◆ File()

WinGetArguments WGetNET.WinGetArguments.File ( string file)

Adds a file path to the arguments.

Behavior depends on base cmd. If the base cmd does not read or write from or to a file, the function will do nothing.

Parameters
fileThe System.String that contains the file path.
Returns
The updated WGetNET.WinGetArguments object.
Exceptions
System.ArgumentNullExceptionA provided argument is null.
System.ArgumentExceptionA provided argument is empty.

Definition at line 439 of file WinGetArguments.cs.

◆ Force()

WinGetArguments WGetNET.WinGetArguments.Force ( )

Adds the '–force' flag to the arguments.

Returns
The updated WGetNET.WinGetArguments object.

Definition at line 799 of file WinGetArguments.cs.

◆ Hash()

static WinGetArguments WGetNET.WinGetArguments.Hash ( )
static

Creates a new winget arguments object with "hash" as the base cmd.

Returns
The created WGetNET.WinGetArguments object.

Definition at line 212 of file WinGetArguments.cs.

◆ IgnoreUnavailable()

WinGetArguments WGetNET.WinGetArguments.IgnoreUnavailable ( )

Adds the '–ignore-unavailable' flag to the arguments.

Returns
The updated WGetNET.WinGetArguments object.

Definition at line 763 of file WinGetArguments.cs.

◆ Import()

static WinGetArguments WGetNET.WinGetArguments.Import ( )
static

Creates a new winget arguments object with "import" as the base cmd.

Returns
The created WGetNET.WinGetArguments object.

Definition at line 201 of file WinGetArguments.cs.

◆ IncludeUnknown()

WinGetArguments WGetNET.WinGetArguments.IncludeUnknown ( )

Adds the '–include-unknown' flag to the arguments.

Returns
The updated WGetNET.WinGetArguments object.

Definition at line 727 of file WinGetArguments.cs.

◆ Info()

WinGetArguments WGetNET.WinGetArguments.Info ( )

Adds the '–info' flag to the arguments.

Returns
The updated WGetNET.WinGetArguments object.

Definition at line 811 of file WinGetArguments.cs.

◆ Install()

static WinGetArguments WGetNET.WinGetArguments.Install ( )
static

Creates a new winget arguments object with "install" as the base cmd.

Returns
The created WGetNET.WinGetArguments object.

Definition at line 135 of file WinGetArguments.cs.

◆ Installed()

WinGetArguments WGetNET.WinGetArguments.Installed ( )

Adds the '–installed' flag to the arguments.

Returns
The updated WGetNET.WinGetArguments object.

Definition at line 775 of file WinGetArguments.cs.

◆ List()

static WinGetArguments WGetNET.WinGetArguments.List ( )
static

Creates a new winget arguments object with "list" as the base cmd.

Returns
The created WGetNET.WinGetArguments object.

Definition at line 113 of file WinGetArguments.cs.

◆ Name()

WinGetArguments WGetNET.WinGetArguments.Name ( string name)

Adds name data to the arguments.

Mainly used for Source based actions.

Parameters
nameA System.String containing the name to add to the arguments.
Returns
The updated WGetNET.WinGetArguments object.
Exceptions
System.ArgumentNullExceptionA provided argument is null.
System.ArgumentExceptionA provided argument is empty.

Definition at line 570 of file WinGetArguments.cs.

◆ PinAdd()

static WinGetArguments WGetNET.WinGetArguments.PinAdd ( )
static

Creates a new winget arguments object with "pin add" as the base cmd.

Returns
The created WGetNET.WinGetArguments object.

Definition at line 234 of file WinGetArguments.cs.

◆ PinList()

static WinGetArguments WGetNET.WinGetArguments.PinList ( )
static

Creates a new winget arguments object with "pin list" as the base cmd.

Returns
The created WGetNET.WinGetArguments object.

Definition at line 223 of file WinGetArguments.cs.

◆ PinRemove()

static WinGetArguments WGetNET.WinGetArguments.PinRemove ( )
static

Creates a new winget arguments object with "pin remove" as the base cmd.

Returns
The created WGetNET.WinGetArguments object.

Definition at line 245 of file WinGetArguments.cs.

◆ PinReset()

static WinGetArguments WGetNET.WinGetArguments.PinReset ( )
static

Creates a new winget arguments object with "pin reset" as the base cmd.

Returns
The created WGetNET.WinGetArguments object.

Definition at line 256 of file WinGetArguments.cs.

◆ Query()

WinGetArguments WGetNET.WinGetArguments.Query ( string query)

Adds a query to the arguments.

Mainly used for Package based actions.

Parameters
queryThe System.String that should be added as a query.
Returns
The updated WGetNET.WinGetArguments object.
Exceptions
System.ArgumentNullExceptionA provided argument is null.
System.ArgumentExceptionA provided argument is empty.

Definition at line 390 of file WinGetArguments.cs.

◆ Repair()

static WinGetArguments WGetNET.WinGetArguments.Repair ( )
static

Creates a new winget arguments object with "repair" as the base cmd.

Returns
The created WGetNET.WinGetArguments object.

Definition at line 179 of file WinGetArguments.cs.

◆ Search()

static WinGetArguments WGetNET.WinGetArguments.Search ( )
static

Creates a new winget arguments object with "search" as the base cmd.

Returns
The created WGetNET.WinGetArguments object.

Definition at line 124 of file WinGetArguments.cs.

◆ Settings()

static WinGetArguments WGetNET.WinGetArguments.Settings ( )
static

Creates a new winget arguments object with "settings" as the base cmd.

Returns
The created WGetNET.WinGetArguments object.

Definition at line 91 of file WinGetArguments.cs.

◆ SettingsExport()

static WinGetArguments WGetNET.WinGetArguments.SettingsExport ( )
static

Creates a new winget arguments object with "settings export" as the base cmd.

Returns
The created WGetNET.WinGetArguments object.

Definition at line 102 of file WinGetArguments.cs.

◆ Silent()

WinGetArguments WGetNET.WinGetArguments.Silent ( )

Adds the '–silent' flag to the arguments.

Returns
The updated WGetNET.WinGetArguments object.

Definition at line 703 of file WinGetArguments.cs.

◆ Source()

WinGetArguments WGetNET.WinGetArguments.Source ( string source)

Adds a source query to the arguments.

Parameters
sourceThe System.String that contains the source name.
Returns
The updated WGetNET.WinGetArguments object.
Exceptions
System.ArgumentNullExceptionA provided argument is null.
System.ArgumentExceptionA provided argument is empty.

Definition at line 413 of file WinGetArguments.cs.

◆ SourceAdd()

static WinGetArguments WGetNET.WinGetArguments.SourceAdd ( )
static

Creates a new winget arguments object with "source add" as the base cmd.

Returns
The created WGetNET.WinGetArguments object.

Definition at line 267 of file WinGetArguments.cs.

◆ SourceExport()

static WinGetArguments WGetNET.WinGetArguments.SourceExport ( )
static

Creates a new winget arguments object with "source export" as the base cmd.

Returns
The created WGetNET.WinGetArguments object.

Definition at line 311 of file WinGetArguments.cs.

◆ SourceRemove()

static WinGetArguments WGetNET.WinGetArguments.SourceRemove ( )
static

Creates a new winget arguments object with "source remove" as the base cmd.

Returns
The created WGetNET.WinGetArguments object.

Definition at line 278 of file WinGetArguments.cs.

◆ SourceReset()

static WinGetArguments WGetNET.WinGetArguments.SourceReset ( )
static

Creates a new winget arguments object with "source reset" as the base cmd.

Returns
The created WGetNET.WinGetArguments object.

Definition at line 300 of file WinGetArguments.cs.

◆ SourceUpdate()

static WinGetArguments WGetNET.WinGetArguments.SourceUpdate ( )
static

Creates a new winget arguments object with "source update" as the base cmd.

Returns
The created WGetNET.WinGetArguments object.

Definition at line 289 of file WinGetArguments.cs.

◆ ToString()

override string WGetNET.WinGetArguments.ToString ( )

Definition at line 819 of file WinGetArguments.cs.

◆ Type()

WinGetArguments WGetNET.WinGetArguments.Type ( string type)

Adds type data to the arguments.

Mainly used for Source based actions.

Parameters
typeA System.String containing the type data to add to the arguments.
Returns
The updated WGetNET.WinGetArguments object.
Exceptions
System.ArgumentNullExceptionA provided argument is null.
System.ArgumentExceptionA provided argument is empty.

Definition at line 622 of file WinGetArguments.cs.

◆ Uninstall()

static WinGetArguments WGetNET.WinGetArguments.Uninstall ( )
static

Creates a new winget arguments object with "uninstall" as the base cmd.

Returns
The created WGetNET.WinGetArguments object.

Definition at line 157 of file WinGetArguments.cs.

◆ Upgrade()

static WinGetArguments WGetNET.WinGetArguments.Upgrade ( )
static

Creates a new winget arguments object with "upgrade" as the base cmd.

Returns
The created WGetNET.WinGetArguments object.

Definition at line 146 of file WinGetArguments.cs.

◆ Version() [1/3]

WinGetArguments WGetNET.WinGetArguments.Version ( )

Adds a version query to the arguments.

Returns
The updated WGetNET.WinGetArguments object.

Definition at line 679 of file WinGetArguments.cs.

◆ Version() [2/3]

WinGetArguments WGetNET.WinGetArguments.Version ( string version)

Adds a version query to the arguments.

Parameters
versionThe System.String that contains the version.
Returns
The updated WGetNET.WinGetArguments object.
Exceptions
System.ArgumentNullExceptionA provided argument is null.
System.ArgumentExceptionA provided argument is empty.

Definition at line 645 of file WinGetArguments.cs.

◆ Version() [3/3]

WinGetArguments WGetNET.WinGetArguments.Version ( Version version)

Adds a version query to the arguments.

Parameters
versionA System.Version object containing the version to query.
Returns
The updated WGetNET.WinGetArguments object.
Exceptions
System.ArgumentNullExceptionA provided argument is null.

Definition at line 665 of file WinGetArguments.cs.

◆ WinGet()

static WinGetArguments WGetNET.WinGetArguments.WinGet ( )
static

Creates a new winget arguments object with no base cmd. Used for direct callin of the winget cmd with flags.

Returns
The created WGetNET.WinGetArguments object.

Definition at line 80 of file WinGetArguments.cs.

Property Documentation

◆ Arguments

string WGetNET.WinGetArguments.Arguments
get

Gets the generated arguments.

Definition at line 34 of file WinGetArguments.cs.

◆ IsEmpty

bool WGetNET.WinGetArguments.IsEmpty
get

Gets if the object is empty.

Implements WGetNET.IWinGetObject.

Definition at line 43 of file WinGetArguments.cs.