winget-cli
winget-cli copied to clipboard
Expose Agreements and Locale Fields in COM
The changes in this PR expose all of the locale fields including agreements. Also provides a way for the COM caller to accept or reject package/source agreements. To avoid breaking existing usage, the default behavior for accepting source/package agreements has been set to true.
Changes:
- Modifies InstallOptions to expose
AcceptPackageAgreements(bool) - Modifies PackageCatalogReference to expose
AcceptSourceAgreements(bool) - Modifies PackageVersionInfo to expose two methods for obtaining a CatalogPackageMetadata object which contains the locale fields (including agreements).
GetCatalogPackageMetadata()with no parameters uses the default localization, whileGetCatalogPackageMetadata(string locale)applies the specified locale and retrieves those locale fields. Tests:
Added tests to verify that all locale fields and agreements are outputted correctly.