Skip to content

Commit 3a9f98a

Browse files
committed
Added the 'HasUpgrade' property to the WinGetPackage class
1 parent cbbf5a2 commit 3a9f98a

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

‎src/WGet.NET/Data/WinGetPackage.cs‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,22 @@ public bool HasNoId
124124
}
125125
}
126126

127+
/// <summary>
128+
/// Gets if the package can be upgraded.
129+
/// </summary>
130+
public bool HasUpgrade
131+
{
132+
get
133+
{
134+
if (_availableVersion > _version)
135+
{
136+
return true;
137+
}
138+
139+
return false;
140+
}
141+
}
142+
127143
/// <summary>
128144
/// Gets if the object is empty.
129145
/// </summary>

0 commit comments

Comments
 (0)