Represents a winget package.
More...
|
bool | SamePackage (WinGetPackage other, bool sameVersion=false) |
| Checks if two packages are the same and optionally if they also have the same version.
|
|
virtual object | Clone () |
|
override string | ToString () |
|
|
static WinGetPackage | Create (string name, string id, string version, string sourceName="") |
| Creates a new instance of the WGetNET.WinGetPackage class and returns it.
|
|
static WinGetPackage | Create (string name, string id, string version, string availableVersion, string sourceName="") |
| Creates a new instance of the WGetNET.WinGetPackage class and returns it.
|
|
static WinGetPackage | Create (string name, string id, Version version, string sourceName="") |
| Creates a new instance of the WGetNET.WinGetPackage class and returns it.
|
|
static WinGetPackage | Create (string name, string id, Version version, Version availableVersion, string sourceName="") |
| Creates a new instance of the WGetNET.WinGetPackage class and returns it.
|
|
|
string | Name [get] |
| Gets the name of the package.
|
|
string | Id [get] |
| Gets the id of the package.
|
|
string | VersionString [get] |
| Gets the version of the package.
|
|
Version | Version [get] |
| Gets the version of the package.
|
|
string | AvailableVersionString [get] |
| Gets the newest available version of the package.
|
|
Version | AvailableVersion [get] |
| Gets the newest available version of the package.
|
|
string | SourceName [get] |
| Gets the source name for the package.
|
|
bool | HasShortenedId [get] |
| Gets if id of the package is shortened.
|
|
bool | HasNoId [get] |
| Gets if the package does not provide an id.
|
|
bool | HasUpgrade [get] |
| Gets if the package can be upgraded.
|
|
bool | IsEmpty [get] |
| Gets if the object is empty.
|
|
Represents a winget package.
Definition at line 14 of file WinGetPackage.cs.
◆ Clone()
virtual object WGetNET.WinGetPackage.Clone |
( |
| ) |
|
|
virtual |
◆ Create() [1/4]
static WinGetPackage WGetNET.WinGetPackage.Create |
( |
string | name, |
|
|
string | id, |
|
|
string | version, |
|
|
string | availableVersion, |
|
|
string | sourceName = "" ) |
|
static |
Creates a new instance of the WGetNET.WinGetPackage class and returns it.
- Parameters
-
name | The name of the package. |
id | The id of the package. |
version | The current version of the package as a System.String. |
availableVersion | The highest available version of the package as a System.String. |
sourceName | The name of the source the package comes from. |
- Returns
- The created instance of the WGetNET.WinGetPackage class.
- Exceptions
-
System.ArgumentException | A provided argument is empty. |
System.ArgumentNullException | A provided argument is null. |
Definition at line 259 of file WinGetPackage.cs.
◆ Create() [2/4]
static WinGetPackage WGetNET.WinGetPackage.Create |
( |
string | name, |
|
|
string | id, |
|
|
string | version, |
|
|
string | sourceName = "" ) |
|
static |
Creates a new instance of the WGetNET.WinGetPackage class and returns it.
- Parameters
-
name | The name of the package. |
id | The id of the package. |
version | The current version of the package as a System.String. It will also be used for the available version. |
sourceName | The name of the source the package comes from. |
- Returns
- The created instance of the WGetNET.WinGetPackage class.
- Exceptions
-
System.ArgumentException | A provided argument is empty. |
System.ArgumentNullException | A provided argument is null. |
Definition at line 225 of file WinGetPackage.cs.
◆ Create() [3/4]
static WinGetPackage WGetNET.WinGetPackage.Create |
( |
string | name, |
|
|
string | id, |
|
|
Version | version, |
|
|
string | sourceName = "" ) |
|
static |
Creates a new instance of the WGetNET.WinGetPackage class and returns it.
- Parameters
-
name | The name of the package. |
id | The id of the package. |
version | The current version of the package. It will also be used for the available version. |
sourceName | The name of the source the package comes from. |
- Returns
- The created instance of the WGetNET.WinGetPackage class.
- Exceptions
-
System.ArgumentException | A provided argument is empty. |
System.ArgumentNullException | A provided argument is null. |
Definition at line 294 of file WinGetPackage.cs.
◆ Create() [4/4]
static WinGetPackage WGetNET.WinGetPackage.Create |
( |
string | name, |
|
|
string | id, |
|
|
Version | version, |
|
|
Version | availableVersion, |
|
|
string | sourceName = "" ) |
|
static |
Creates a new instance of the WGetNET.WinGetPackage class and returns it.
- Parameters
-
name | The name of the package. |
id | The id of the package. |
version | The current version of the package. |
availableVersion | The highest available version of the package. |
sourceName | The name of the source the package comes from. |
- Returns
- The created instance of the WGetNET.WinGetPackage class.
- Exceptions
-
System.ArgumentException | A provided argument is empty. |
System.ArgumentNullException | A provided argument is null. |
Definition at line 328 of file WinGetPackage.cs.
◆ SamePackage()
bool WGetNET.WinGetPackage.SamePackage |
( |
WinGetPackage | other, |
|
|
bool | sameVersion = false ) |
Checks if two packages are the same and optionally if they also have the same version.
- Parameters
-
other | The WGetNET.WinGetPackage to compare with. |
sameVersion | Set to true to also check for the same version. |
- Returns
true
if both packages are the same and false
if not.
Definition at line 359 of file WinGetPackage.cs.
◆ ToString()
override string WGetNET.WinGetPackage.ToString |
( |
| ) |
|
◆ AvailableVersion
Version WGetNET.WinGetPackage.AvailableVersion |
|
get |
Gets the newest available version of the package.
Definition at line 74 of file WinGetPackage.cs.
◆ AvailableVersionString
string WGetNET.WinGetPackage.AvailableVersionString |
|
get |
Gets the newest available version of the package.
Definition at line 63 of file WinGetPackage.cs.
◆ HasNoId
bool WGetNET.WinGetPackage.HasNoId |
|
get |
Gets if the package does not provide an id.
If this is true somthing whent wrong in the creation of the package. The name of the package will be used for all actions performd with this package.
Definition at line 114 of file WinGetPackage.cs.
◆ HasShortenedId
bool WGetNET.WinGetPackage.HasShortenedId |
|
get |
Gets if id of the package is shortened.
The name of the package will be used for all actions performd with this package.
Definition at line 99 of file WinGetPackage.cs.
◆ HasUpgrade
bool WGetNET.WinGetPackage.HasUpgrade |
|
get |
◆ Id
string WGetNET.WinGetPackage.Id |
|
get |
◆ IsEmpty
bool WGetNET.WinGetPackage.IsEmpty |
|
get |
Gets if the object is empty.
A package object counts as empty if it does not contain a id and name. Because the rest of the information is useless in this state.
Implements WGetNET.IWinGetObject.
Definition at line 150 of file WinGetPackage.cs.
◆ Name
string WGetNET.WinGetPackage.Name |
|
get |
◆ SourceName
string WGetNET.WinGetPackage.SourceName |
|
get |
◆ Version
Version WGetNET.WinGetPackage.Version |
|
get |
◆ VersionString
string WGetNET.WinGetPackage.VersionString |
|
get |