diff --git a/pipelines/templates/copy-and-publish-powershell.yml b/pipelines/templates/copy-and-publish-powershell.yml new file mode 100644 index 00000000..d3e2cfc8 --- /dev/null +++ b/pipelines/templates/copy-and-publish-powershell.yml @@ -0,0 +1,27 @@ +# Template helper to copy powershell dependency files and publish them as an artifact +parameters: + name: '' + source: '' + TargetPlatform: '' + +steps: +- task: CopyFiles@2 + displayName: 'Copy Files: ${{ parameters.name }}' + inputs: + Contents: | + ${{ parameters.source }}\Microsoft.Extensions.Logging.Abstractions.dll + ${{ parameters.source }}\Microsoft.WinGet.PowershellSupport.dll + ${{ parameters.source }}\Microsoft.WinGet.RestSource.Util.dll + ${{ parameters.source }}\Newtonsoft.Json.dll + ${{ parameters.source }}\System.ComponentModel.Annotations.dll + ${{ parameters.source }}\YamlDotNet.dll + ${{ parameters.source }}\runtimes\win-${{TargetPlatform}}\native\WinGetUtil.dll + TargetFolder: '$(build.artifactstagingdirectory)\${{ parameters.name }}' + CleanTargetFolder: true + OverWrite: true + +- task: PublishBuildArtifacts@1 + displayName: 'Publish Artifact: WinGet.RestSource-${{ parameters.name }}' + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)\${{ parameters.name }}' + ArtifactName: 'WinGet.RestSource-${{ parameters.name }}' diff --git a/pipelines/templates/restore-build-publish-test.yml b/pipelines/templates/restore-build-publish-test.yml index 9fe7c5c5..3efbc6f7 100644 --- a/pipelines/templates/restore-build-publish-test.yml +++ b/pipelines/templates/restore-build-publish-test.yml @@ -1,51 +1,64 @@ -# Template helper to restore, build, and publish - -steps: -## Restore -- task: DotNetCoreCLI@2 - displayName: 'Restore' - inputs: - command: 'restore' - projects: '**/*.csproj' - feedsToUse: 'config' - nugetConfigPath: '$(Build.SourcesDirectory)\src\NuGEt.config' - restoreDirectory: '$(Build.SourcesDirectory)\src\packages' - -## Build -- task: VSBuild@1 - displayName: Build - inputs: - platform: '$(BuildPlatform)' - configuration: '$(BuildConfiguration)' - clean: true - -## Publish -# Publish ARM Templates -- template: copy-and-publish.yml - parameters: - name: WinGet.Restsource.Infrastructure - source: '$(Build.SourcesDirectory)\src\WinGet.RestSource.Infrastructure\bin\$(BuildConfiguration)' - -# Publish Rest Function App -- template: package-and-publish.yml - parameters: - name: WinGet.RestSource.Functions - projects: '$(Build.SourcesDirectory)\src\WinGet.RestSource.Functions\WinGet.RestSource.Functions.csproj' - buildconfig: '$(BuildConfiguration)' - zipAfterPublish: True - -## Run Unit Tests -- template: run-unittests.yml - parameters: - name: WinGet.RestSource.UnitTest - source: '$(Build.SourcesDirectory)\src\WinGet.RestSource.UnitTest\bin\$(BuildConfiguration)\netcoreapp3.1' - dll: Microsoft.WinGet.RestSource.UnitTest.dll - -## Component Governance -- task: ComponentGovernanceComponentDetection@0 - displayName: Component Governance - inputs: - scanType: 'Register' - verbosity: 'Verbose' - alertWarningLevel: 'High' +# Template helper to restore, build, and publish + +steps: +## Restore +- task: DotNetCoreCLI@2 + displayName: 'Restore' + inputs: + command: 'restore' + projects: '**/*.csproj' + feedsToUse: 'config' + nugetConfigPath: '$(Build.SourcesDirectory)\src\NuGEt.config' + restoreDirectory: '$(Build.SourcesDirectory)\src\packages' + +## Build +- task: VSBuild@1 + displayName: Build + inputs: + platform: '$(BuildPlatform)' + configuration: '$(BuildConfiguration)' + clean: true + +## Publish +# Publish ARM Templates +- template: copy-and-publish.yml + parameters: + name: WinGet.Restsource.Infrastructure + source: '$(Build.SourcesDirectory)\src\WinGet.RestSource.Infrastructure\bin\$(BuildConfiguration)' + +# Publish Rest Function App +- template: package-and-publish.yml + parameters: + name: WinGet.RestSource.Functions + projects: '$(Build.SourcesDirectory)\src\WinGet.RestSource.Functions\WinGet.RestSource.Functions.csproj' + buildconfig: '$(BuildConfiguration)' + zipAfterPublish: True + +# Publish x86 powershell binaries +- template: copy-and-publish-powershell.yml + parameters: + name: WinGet.Restsource.x86PowershellSupport + source: '$(Build.SourcesDirectory)\src\WinGet.RestSource.PowershellSupport\bin\$(BuildConfiguration)\netstandard2.0' + BuildPlatform: 'x86' + +- template: copy-and-publish-powershell.yml + parameters: + name: WinGet.Restsource.x64PowershellSupport + source: '$(Build.SourcesDirectory)\src\WinGet.RestSource.PowershellSupport\bin\$(BuildConfiguration)\netstandard2.0' + BuildPlatform: 'x64' + +## Run Unit Tests +- template: run-unittests.yml + parameters: + name: WinGet.RestSource.UnitTest + source: '$(Build.SourcesDirectory)\src\WinGet.RestSource.UnitTest\bin\$(BuildConfiguration)\netcoreapp3.1' + dll: Microsoft.WinGet.RestSource.UnitTest.dll + +## Component Governance +- task: ComponentGovernanceComponentDetection@0 + displayName: Component Governance + inputs: + scanType: 'Register' + verbosity: 'Verbose' + alertWarningLevel: 'High' failOnAlert: true \ No newline at end of file diff --git a/src/NuGet.config b/src/NuGet.config index 160f170e..96eb734e 100644 --- a/src/NuGet.config +++ b/src/NuGet.config @@ -1,22 +1,22 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/WinGet.RestSource.Functions/Common/ActionResultHelper.cs b/src/WinGet.RestSource.Functions/Common/ActionResultHelper.cs index 419e2dca..a7533f25 100644 --- a/src/WinGet.RestSource.Functions/Common/ActionResultHelper.cs +++ b/src/WinGet.RestSource.Functions/Common/ActionResultHelper.cs @@ -8,8 +8,8 @@ namespace Microsoft.WinGet.RestSource.Functions.Common { using System; using System.Net; - using Microsoft.WinGet.RestSource.Constants; - using Microsoft.WinGet.RestSource.Models.Errors; + using Microsoft.WinGet.RestSource.Utils.Constants; + using Microsoft.WinGet.RestSource.Utils.Models.Errors; /// /// This Creates Action Results. diff --git a/src/WinGet.RestSource.Functions/InstallerFunctions.cs b/src/WinGet.RestSource.Functions/InstallerFunctions.cs index 86634315..11d8942f 100644 --- a/src/WinGet.RestSource.Functions/InstallerFunctions.cs +++ b/src/WinGet.RestSource.Functions/InstallerFunctions.cs @@ -15,14 +15,14 @@ namespace Microsoft.WinGet.RestSource.Functions using Microsoft.Azure.WebJobs; using Microsoft.Azure.WebJobs.Extensions.Http; using Microsoft.Extensions.Logging; - using Microsoft.WinGet.RestSource.Common; - using Microsoft.WinGet.RestSource.Constants; - using Microsoft.WinGet.RestSource.Exceptions; using Microsoft.WinGet.RestSource.Functions.Common; - using Microsoft.WinGet.RestSource.Models; - using Microsoft.WinGet.RestSource.Models.Errors; - using Microsoft.WinGet.RestSource.Models.Schemas; - using Microsoft.WinGet.RestSource.Validators; + using Microsoft.WinGet.RestSource.Utils.Common; + using Microsoft.WinGet.RestSource.Utils.Constants; + using Microsoft.WinGet.RestSource.Utils.Exceptions; + using Microsoft.WinGet.RestSource.Utils.Models; + using Microsoft.WinGet.RestSource.Utils.Models.Errors; + using Microsoft.WinGet.RestSource.Utils.Models.Schemas; + using Microsoft.WinGet.RestSource.Utils.Validators; /// /// This class contains the functions for interacting with installers. diff --git a/src/WinGet.RestSource.Functions/LocaleFunctions.cs b/src/WinGet.RestSource.Functions/LocaleFunctions.cs index c71845a9..d80d38d7 100644 --- a/src/WinGet.RestSource.Functions/LocaleFunctions.cs +++ b/src/WinGet.RestSource.Functions/LocaleFunctions.cs @@ -15,14 +15,14 @@ namespace Microsoft.WinGet.RestSource.Functions using Microsoft.Azure.WebJobs; using Microsoft.Azure.WebJobs.Extensions.Http; using Microsoft.Extensions.Logging; - using Microsoft.WinGet.RestSource.Common; - using Microsoft.WinGet.RestSource.Constants; - using Microsoft.WinGet.RestSource.Exceptions; using Microsoft.WinGet.RestSource.Functions.Common; - using Microsoft.WinGet.RestSource.Models; - using Microsoft.WinGet.RestSource.Models.Errors; - using Microsoft.WinGet.RestSource.Models.Schemas; - using Microsoft.WinGet.RestSource.Validators; + using Microsoft.WinGet.RestSource.Utils.Common; + using Microsoft.WinGet.RestSource.Utils.Constants; + using Microsoft.WinGet.RestSource.Utils.Exceptions; + using Microsoft.WinGet.RestSource.Utils.Models; + using Microsoft.WinGet.RestSource.Utils.Models.Errors; + using Microsoft.WinGet.RestSource.Utils.Models.Schemas; + using Microsoft.WinGet.RestSource.Utils.Validators; /// /// This class contains the functions for interacting with locales. diff --git a/src/WinGet.RestSource.Functions/ManifestSearchFunctions.cs b/src/WinGet.RestSource.Functions/ManifestSearchFunctions.cs index 309560b1..1a4ec947 100644 --- a/src/WinGet.RestSource.Functions/ManifestSearchFunctions.cs +++ b/src/WinGet.RestSource.Functions/ManifestSearchFunctions.cs @@ -15,14 +15,14 @@ namespace Microsoft.WinGet.RestSource.Functions using Microsoft.Azure.WebJobs; using Microsoft.Azure.WebJobs.Extensions.Http; using Microsoft.Extensions.Logging; - using Microsoft.WinGet.RestSource.Common; - using Microsoft.WinGet.RestSource.Constants; - using Microsoft.WinGet.RestSource.Exceptions; using Microsoft.WinGet.RestSource.Functions.Common; - using Microsoft.WinGet.RestSource.Models; - using Microsoft.WinGet.RestSource.Models.Arrays; - using Microsoft.WinGet.RestSource.Models.Schemas; - using Microsoft.WinGet.RestSource.Validators; + using Microsoft.WinGet.RestSource.Utils.Common; + using Microsoft.WinGet.RestSource.Utils.Constants; + using Microsoft.WinGet.RestSource.Utils.Exceptions; + using Microsoft.WinGet.RestSource.Utils.Models; + using Microsoft.WinGet.RestSource.Utils.Models.Arrays; + using Microsoft.WinGet.RestSource.Utils.Models.Schemas; + using Microsoft.WinGet.RestSource.Utils.Validators; /// /// This class contains the functions for searching manifests. diff --git a/src/WinGet.RestSource.Functions/PackageFunctions.cs b/src/WinGet.RestSource.Functions/PackageFunctions.cs index 33807820..53af3f82 100644 --- a/src/WinGet.RestSource.Functions/PackageFunctions.cs +++ b/src/WinGet.RestSource.Functions/PackageFunctions.cs @@ -16,14 +16,14 @@ namespace Microsoft.WinGet.RestSource.Functions using Microsoft.Azure.WebJobs.Extensions.Http; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Primitives; - using Microsoft.WinGet.RestSource.Common; - using Microsoft.WinGet.RestSource.Constants; - using Microsoft.WinGet.RestSource.Exceptions; using Microsoft.WinGet.RestSource.Functions.Common; - using Microsoft.WinGet.RestSource.Models; - using Microsoft.WinGet.RestSource.Models.Errors; - using Microsoft.WinGet.RestSource.Models.Schemas; - using Microsoft.WinGet.RestSource.Validators; + using Microsoft.WinGet.RestSource.Utils.Common; + using Microsoft.WinGet.RestSource.Utils.Constants; + using Microsoft.WinGet.RestSource.Utils.Exceptions; + using Microsoft.WinGet.RestSource.Utils.Models; + using Microsoft.WinGet.RestSource.Utils.Models.Errors; + using Microsoft.WinGet.RestSource.Utils.Models.Schemas; + using Microsoft.WinGet.RestSource.Utils.Validators; /// /// This class contains the functions for interacting with packages. diff --git a/src/WinGet.RestSource.Functions/PackageManifestFunctions.cs b/src/WinGet.RestSource.Functions/PackageManifestFunctions.cs index ae625d10..8862eade 100644 --- a/src/WinGet.RestSource.Functions/PackageManifestFunctions.cs +++ b/src/WinGet.RestSource.Functions/PackageManifestFunctions.cs @@ -15,15 +15,15 @@ namespace Microsoft.WinGet.RestSource.Functions using Microsoft.Azure.WebJobs; using Microsoft.Azure.WebJobs.Extensions.Http; using Microsoft.Extensions.Logging; - using Microsoft.WinGet.RestSource.Common; - using Microsoft.WinGet.RestSource.Constants; - using Microsoft.WinGet.RestSource.Exceptions; using Microsoft.WinGet.RestSource.Functions.Common; - using Microsoft.WinGet.RestSource.Models; - using Microsoft.WinGet.RestSource.Models.Arrays; - using Microsoft.WinGet.RestSource.Models.Errors; - using Microsoft.WinGet.RestSource.Models.Schemas; - using Microsoft.WinGet.RestSource.Validators; + using Microsoft.WinGet.RestSource.Utils.Common; + using Microsoft.WinGet.RestSource.Utils.Constants; + using Microsoft.WinGet.RestSource.Utils.Exceptions; + using Microsoft.WinGet.RestSource.Utils.Models; + using Microsoft.WinGet.RestSource.Utils.Models.Arrays; + using Microsoft.WinGet.RestSource.Utils.Models.Errors; + using Microsoft.WinGet.RestSource.Utils.Models.Schemas; + using Microsoft.WinGet.RestSource.Utils.Validators; /// /// This class contains the functions for interacting with manifests. diff --git a/src/WinGet.RestSource.Functions/ServerFunctions.cs b/src/WinGet.RestSource.Functions/ServerFunctions.cs index db539573..5b1e682b 100644 --- a/src/WinGet.RestSource.Functions/ServerFunctions.cs +++ b/src/WinGet.RestSource.Functions/ServerFunctions.cs @@ -12,11 +12,12 @@ namespace Microsoft.WinGet.RestSource.Functions using Microsoft.Azure.WebJobs; using Microsoft.Azure.WebJobs.Extensions.Http; using Microsoft.Extensions.Logging; - using Microsoft.WinGet.RestSource.Constants; - using Microsoft.WinGet.RestSource.Exceptions; + using Microsoft.WinGet.RestSource.Cosmos; using Microsoft.WinGet.RestSource.Functions.Common; - using Microsoft.WinGet.RestSource.Models; - using Microsoft.WinGet.RestSource.Models.Schemas; + using Microsoft.WinGet.RestSource.Utils.Constants; + using Microsoft.WinGet.RestSource.Utils.Exceptions; + using Microsoft.WinGet.RestSource.Utils.Models; + using Microsoft.WinGet.RestSource.Utils.Models.Schemas; /// /// This class contains the functions for interacting with packages. diff --git a/src/WinGet.RestSource.Functions/Startup.cs b/src/WinGet.RestSource.Functions/Startup.cs index b022d9c8..f518e430 100644 --- a/src/WinGet.RestSource.Functions/Startup.cs +++ b/src/WinGet.RestSource.Functions/Startup.cs @@ -15,9 +15,9 @@ namespace Microsoft.WinGet.RestSource.Functions using Microsoft.Azure.Functions.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; - using Microsoft.WinGet.RestSource.Common; - using Microsoft.WinGet.RestSource.Constants; using Microsoft.WinGet.RestSource.Cosmos; + using Microsoft.WinGet.RestSource.Utils.Common; + using Microsoft.WinGet.RestSource.Utils.Constants; /// /// Azure function startup class. diff --git a/src/WinGet.RestSource.Functions/VersionFunctions.cs b/src/WinGet.RestSource.Functions/VersionFunctions.cs index f0ea2cff..5634b56d 100644 --- a/src/WinGet.RestSource.Functions/VersionFunctions.cs +++ b/src/WinGet.RestSource.Functions/VersionFunctions.cs @@ -15,14 +15,14 @@ namespace Microsoft.WinGet.RestSource.Functions using Microsoft.Azure.WebJobs; using Microsoft.Azure.WebJobs.Extensions.Http; using Microsoft.Extensions.Logging; - using Microsoft.WinGet.RestSource.Common; - using Microsoft.WinGet.RestSource.Constants; - using Microsoft.WinGet.RestSource.Exceptions; using Microsoft.WinGet.RestSource.Functions.Common; - using Microsoft.WinGet.RestSource.Models; - using Microsoft.WinGet.RestSource.Models.Errors; - using Microsoft.WinGet.RestSource.Validators; - using Version = Microsoft.WinGet.RestSource.Models.Schemas.Version; + using Microsoft.WinGet.RestSource.Utils.Common; + using Microsoft.WinGet.RestSource.Utils.Constants; + using Microsoft.WinGet.RestSource.Utils.Exceptions; + using Microsoft.WinGet.RestSource.Utils.Models; + using Microsoft.WinGet.RestSource.Utils.Models.Errors; + using Microsoft.WinGet.RestSource.Utils.Validators; + using Version = Microsoft.WinGet.RestSource.Utils.Models.Schemas.Version; /// /// This class contains the functions for interacting with versions. diff --git a/src/WinGet.RestSource.PowershellSupport/Helpers/PackageManifestUtils.cs b/src/WinGet.RestSource.PowershellSupport/Helpers/PackageManifestUtils.cs new file mode 100644 index 00000000..99313a1b --- /dev/null +++ b/src/WinGet.RestSource.PowershellSupport/Helpers/PackageManifestUtils.cs @@ -0,0 +1,312 @@ +// ----------------------------------------------------------------------- +// +// Copyright (c) Microsoft Corporation. Licensed under the MIT License. +// +// ----------------------------------------------------------------------- + +namespace Microsoft.WinGet.RestSource.PowershellSupport.Helpers +{ + using System; + using System.Collections.Generic; + using System.Net; + using System.Net.Http; + using System.Threading.Tasks; + using Microsoft.WinGet.RestSource.PowershellSupport.Helpers; + using Microsoft.WinGet.RestSource.Utils.Common; + using Microsoft.WinGet.RestSource.Utils.Models.Arrays; + using Microsoft.WinGet.RestSource.Utils.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Models.ExtendedSchemas; + using Microsoft.WinGet.RestSource.Utils.Models.Schemas; + using Microsoft.WinGetUtil.Models.V1; + using Newtonsoft.Json; + using Newtonsoft.Json.Linq; + + /// + /// Wrapper class around PackageManifest object. + /// Supports converting yaml manifest to json object. + /// + public sealed class PackageManifestUtils + { + /// + /// Merges a merged manifest object into an existing json representation of the app. + /// + /// Merged manifest object. + /// Prior json data to merge with. + /// A representing the rest source json representation of the package. + public static PackageManifest AddManifestToPackageManifest( + Manifest manifest, + string priorManifest) + { + PackageManifest packageManifest = null; + + if (!string.IsNullOrWhiteSpace(priorManifest)) + { + var data = JObject.Parse(priorManifest); + string priorManifestData = data["Data"].ToString(); + + packageManifest = Parser.StringParser(priorManifestData); + } + else + { + Package package = new Package(); + package.PackageIdentifier = manifest.Id; + packageManifest = new PackageManifest(package); + } + + // Create a new VersionExtended object and populate it with manifest info + // Fields are strings unless otherwise noted. + // PackageVersion + // Channel + // Default locale + // Moniker + // PackageLocale + // Publisher + // PublisherUrl + // PublisherSupportUrl + // PrivacyUrl + // Author + // PackageName + // PackageUrl + // License + // LicenseUrl + // Copyright + // CopyrightUrl + // ShortDescription + // Description + // Tags + // Locales + // Array of Locale where each contains: + // PackageLocale + // Publisher + // PublisherUrl + // PublisherSupportUrl + // PrivacyUrl + // Author + // PackageName + // PackageUrl + // License + // LicenseUrl + // Copyright + // CopyrightUrl + // ShortDescription + // Description + // Tags + // Installers + // Array of Installer where each contains: + // InstallerIdentifier + // InstallerSha256 + // InstallerUrl + // InstallerLocale + // Platform + // Array of strings + // MinimumOsVersion + // InstallerType + // Scope + // SignatureSha256 + // InstallModes + // Array of strings + // InstallerSwitches + // Silent + // SilentWithProgress + // Interactive + // InstallLocation + // Log + // Upgrade + // Custom + // InstallerSuccessCodes + // Array of ints + // UpgradeBehavior + // Commands + // Array of strings + // Protocols + // Array of strings + // FileExtensions + // Array of strings + // Dependencies + // WindowsFeatures + // Array of strings + // WindowsLibraries + // Array of strings + // PackageDependencies + // Array of package dependencies where each contains: + // PackageIdentifier + // MinimumVersion + // ExternalDependencies + // Array of strings + // PackageFamilyName + // ProductCode + // Capabilities + // Array of strings + // RestrictedCapabilities + // Array of strings + VersionExtended versionExtended = new VersionExtended(); + versionExtended.PackageVersion = manifest.Version; + versionExtended.Channel = manifest.Channel; + + versionExtended.DefaultLocale = new DefaultLocale(); + versionExtended.DefaultLocale.Moniker = string.IsNullOrWhiteSpace(manifest.Moniker) ? null : manifest.Moniker; + versionExtended.DefaultLocale.PackageLocale = manifest.PackageLocale; + versionExtended.DefaultLocale.Publisher = manifest.Publisher; + versionExtended.DefaultLocale.PublisherUrl = manifest.PublisherUrl; + versionExtended.DefaultLocale.PublisherSupportUrl = manifest.PublisherSupportUrl; + versionExtended.DefaultLocale.PrivacyUrl = manifest.PrivacyUrl; + versionExtended.DefaultLocale.Author = manifest.Author; + versionExtended.DefaultLocale.PackageName = manifest.PackageName; + versionExtended.DefaultLocale.PackageUrl = manifest.PackageUrl; + versionExtended.DefaultLocale.License = manifest.License; + versionExtended.DefaultLocale.LicenseUrl = manifest.LicenseUrl; + versionExtended.DefaultLocale.Copyright = manifest.Copyright; + versionExtended.DefaultLocale.CopyrightUrl = manifest.CopyrightUrl; + versionExtended.DefaultLocale.ShortDescription = manifest.ShortDescription; + versionExtended.DefaultLocale.Description = manifest.Description; + + versionExtended.DefaultLocale.Tags = PackageManifestUtils.AddToList(manifest.Tags); + + if (manifest.Localization != null) + { + foreach (var localization in manifest.Localization) + { + Locale newLocale = new Locale(); + newLocale.PackageLocale = localization.PackageLocale; + newLocale.Publisher = localization.Publisher; + newLocale.PublisherUrl = localization.PublisherUrl; + newLocale.PublisherSupportUrl = localization.PublisherSupportUrl; + newLocale.PrivacyUrl = localization.PrivacyUrl; + newLocale.Author = localization.Author; + newLocale.PackageName = localization.PackageName; + newLocale.PackageUrl = localization.PackageUrl; + newLocale.License = localization.License; + newLocale.LicenseUrl = localization.LicenseUrl; + newLocale.Copyright = localization.Copyright; + newLocale.CopyrightUrl = localization.CopyrightUrl; + newLocale.ShortDescription = localization.ShortDescription; + newLocale.Description = localization.Description; + + newLocale.Tags = PackageManifestUtils.AddToList(localization.Tags); + + versionExtended.AddLocale(newLocale); + } + } + + if (manifest.Installers != null) + { + foreach (var installer in manifest.Installers) + { + Installer newInstaller = new Installer(); + newInstaller.InstallerIdentifier = string.Join("_", installer.Arch, installer.InstallerLocale, installer.Scope, Guid.NewGuid()); + newInstaller.InstallerSha256 = installer.Sha256; + newInstaller.InstallerUrl = installer.Url; + newInstaller.InstallerLocale = installer.InstallerLocale; + newInstaller.Architecture = installer.Arch; + + newInstaller.Platform = PackageManifestUtils.AddToList(installer.Platform); + + newInstaller.MinimumOsVersion = installer.MinimumOSVersion; + newInstaller.InstallerType = installer.InstallerType; + newInstaller.Scope = installer.Scope; + newInstaller.SignatureSha256 = installer.SignatureSha256; + + newInstaller.InstallModes = PackageManifestUtils.AddToList(installer.InstallModes); + + // Process Installer Switches subnode. + if (installer.Switches != null) + { + newInstaller.InstallerSwitches = new Utils.Models.Objects.InstallerSwitches + { + Silent = string.IsNullOrWhiteSpace(installer.Switches.Silent) ? null : installer.Switches.Silent, + SilentWithProgress = string.IsNullOrWhiteSpace(installer.Switches.SilentWithProgress) ? null : installer.Switches.SilentWithProgress, + Interactive = string.IsNullOrWhiteSpace(installer.Switches.Interactive) ? null : installer.Switches.Interactive, + InstallLocation = string.IsNullOrWhiteSpace(installer.Switches.InstallLocation) ? null : installer.Switches.InstallLocation, + Log = string.IsNullOrWhiteSpace(installer.Switches.Log) ? null : installer.Switches.Log, + Upgrade = string.IsNullOrWhiteSpace(installer.Switches.Upgrade) ? null : installer.Switches.Upgrade, + Custom = string.IsNullOrWhiteSpace(installer.Switches.Custom) ? null : installer.Switches.Custom, + }; + } + + if (installer.InstallerSuccessCodes != null) + { + newInstaller.InstallerSuccessCodes = PackageManifestUtils.AddToList(installer.InstallerSuccessCodes.ConvertAll(i => (long)i)); + } + + newInstaller.UpgradeBehavior = installer.UpgradeBehavior; + + newInstaller.Commands = PackageManifestUtils.AddToList(installer.Commands); + newInstaller.Protocols = PackageManifestUtils.AddToList(installer.Protocols); + newInstaller.FileExtensions = PackageManifestUtils.AddToList(installer.FileExtensions); + + // Process dependencies subnode. + if (installer.Dependencies != null) + { + newInstaller.Dependencies = new Utils.Models.Objects.Dependencies(); + + newInstaller.Dependencies.WindowsFeatures = PackageManifestUtils.AddToList(installer.Dependencies.WindowsFeatures); + newInstaller.Dependencies.WindowsLibraries = PackageManifestUtils.AddToList(installer.Dependencies.WindowsLibraries); + + if (installer.Dependencies.PackageDependencies != null) + { + newInstaller.Dependencies.PackageDependencies = new PackageDependency(); + foreach (var installerPackageDependency in installer.Dependencies.PackageDependencies) + { + Utils.Models.Objects.PackageDependency packageDependency = new Utils.Models.Objects.PackageDependency + { + PackageIdentifier = installerPackageDependency.PackageIdentifier, + MinimumVersion = installerPackageDependency.MinimumVersion, + }; + newInstaller.Dependencies.PackageDependencies.Add(packageDependency); + } + } + + newInstaller.Dependencies.ExternalDependencies = PackageManifestUtils.AddToList(installer.Dependencies.ExternalDependencies); + } + + newInstaller.PackageFamilyName = installer.PackageFamilyName; + newInstaller.ProductCode = installer.ProductCode; + newInstaller.Capabilities = PackageManifestUtils.AddToList(installer.Capabilities); + newInstaller.RestrictedCapabilities = PackageManifestUtils.AddToList(installer.RestrictedCapabilities); + + versionExtended.AddInstaller(newInstaller); + } + } + + // Are we updating an existing version metadata or writing a new version? + if (packageManifest.Versions != null && packageManifest.Versions.Exists(version => version.PackageVersion == manifest.Version)) + { + // Update + packageManifest.UpdateVersion(versionExtended); + } + else + { + // Add + packageManifest.AddVersion(versionExtended); + } + + return packageManifest; + } + + private static T AddToList(IEnumerable from) + where T : ApiArray, new() + { + T to = null; + if (from != null) + { + to = new T(); + to.AddRange(from); + } + + return to; + } + + private static T AddToList(IEnumerable from) + where T : ApiArray, new() + { + T to = null; + if (from != null) + { + to = new T(); + to.AddRange(from); + } + + return to; + } + } +} diff --git a/src/WinGet.RestSource.PowershellSupport/WinGet.RestSource.PowershellSupport.csproj b/src/WinGet.RestSource.PowershellSupport/WinGet.RestSource.PowershellSupport.csproj new file mode 100644 index 00000000..513561ed --- /dev/null +++ b/src/WinGet.RestSource.PowershellSupport/WinGet.RestSource.PowershellSupport.csproj @@ -0,0 +1,57 @@ + + + + netstandard2.0 + true + Microsoft.WinGet.PowershellSupport + Microsoft.WinGet.PowershellSupport + Library + 8 + + + + full + true + 1701;1702;NU1701 + $(SolutionDir)WinGet.RestSource\Microsoft.WinGet.PowershellSupport.Documentation.xml + true + + + + DEBUG;TRACE + false + + + + + true + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/WinGet.RestSource.PowershellSupport/YamlToRestConverter.cs b/src/WinGet.RestSource.PowershellSupport/YamlToRestConverter.cs new file mode 100644 index 00000000..7dbbb35b --- /dev/null +++ b/src/WinGet.RestSource.PowershellSupport/YamlToRestConverter.cs @@ -0,0 +1,69 @@ +// ----------------------------------------------------------------------- +// +// Copyright (c) Microsoft Corporation. Licensed under the MIT License. +// +// ----------------------------------------------------------------------- + +namespace Microsoft.WinGet.RestSource.PowershellSupport +{ + using System; + using System.IO; + using System.Linq; + using Microsoft.WinGet.RestSource.PowershellSupport.Helpers; + using Microsoft.WinGet.RestSource.Utils.Models.Schemas; + using Microsoft.WinGetUtil.Helpers; + using Microsoft.WinGetUtil.Models.V1; + using Newtonsoft.Json; + + /// + /// Supports converting yaml manifest to json string. + /// Primarily supports powershell modules. + /// + public static class YamlToRestConverter + { + /// + /// Processes a directory for yaml manifests and converts it into the rest json format. + /// + /// direcoty to process. Should contain the manifests for a single app. + /// Prior json data to merge with. + /// A string of the rest source json. + public static string AddManifestToPackageManifest( + string directory, + string priorRestManifest) + { + // Construct merged manifest + var packageFiles = Directory.GetFiles(directory); + string mergedManifestFilePath = + Path.Combine( + Path.GetTempPath(), + Path.GetRandomFileName() + ".yaml"); + if (packageFiles.Length > 1) + { + // Multi File manifest case + // The winget client ValidateManifest function + // merges the manifests into the merged manifest format. + (bool succeeded, string response) = WinGetUtilWrapperManifest.ValidateManifest( + directory, + mergedManifestFilePath); + + if (!succeeded) + { + throw new Exception("Unable to validate manifest"); + } + } + else + { + mergedManifestFilePath = packageFiles.First(); + } + + Manifest manifest = Manifest.CreateManifestFromPath(mergedManifestFilePath); + + // Convert the manifest into a rest manifestPost format and merge with any existing data. + PackageManifest packageManifest = PackageManifestUtils.AddManifestToPackageManifest( + manifest, + priorRestManifest); + + return JsonConvert.SerializeObject(packageManifest); + } + } +} diff --git a/src/WinGet.RestSource.UnitTest/Tests/RestSource/Common/FormatJSONTest.cs b/src/WinGet.RestSource.UnitTest/Tests/RestSource/Common/FormatJSONTest.cs index f86a76a2..2a599302 100644 --- a/src/WinGet.RestSource.UnitTest/Tests/RestSource/Common/FormatJSONTest.cs +++ b/src/WinGet.RestSource.UnitTest/Tests/RestSource/Common/FormatJSONTest.cs @@ -7,7 +7,7 @@ namespace Microsoft.Winget.RestSource.UnitTest.Tests.RestSource.Common { using System.Collections.Generic; - using Microsoft.WinGet.RestSource.Common; + using Microsoft.WinGet.RestSource.Utils.Common; using Xunit; using Xunit.Abstractions; diff --git a/src/WinGet.RestSource/Common/ApiContinuationToken.cs b/src/WinGet.RestSource.Utils/Common/ApiContinuationToken.cs similarity index 92% rename from src/WinGet.RestSource/Common/ApiContinuationToken.cs rename to src/WinGet.RestSource.Utils/Common/ApiContinuationToken.cs index be9767c3..67f2d3eb 100644 --- a/src/WinGet.RestSource/Common/ApiContinuationToken.cs +++ b/src/WinGet.RestSource.Utils/Common/ApiContinuationToken.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Common +namespace Microsoft.WinGet.RestSource.Utils.Common { /// /// This is a template continuation token for if a system token is not provided. diff --git a/src/WinGet.RestSource/Common/ApiDataPage.cs b/src/WinGet.RestSource.Utils/Common/ApiDataPage.cs similarity index 93% rename from src/WinGet.RestSource/Common/ApiDataPage.cs rename to src/WinGet.RestSource.Utils/Common/ApiDataPage.cs index d03272db..fdae6d7a 100644 --- a/src/WinGet.RestSource/Common/ApiDataPage.cs +++ b/src/WinGet.RestSource.Utils/Common/ApiDataPage.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Common +namespace Microsoft.WinGet.RestSource.Utils.Common { using System.Collections.Generic; diff --git a/src/WinGet.RestSource/Common/FormatJSON.cs b/src/WinGet.RestSource.Utils/Common/FormatJSON.cs similarity index 96% rename from src/WinGet.RestSource/Common/FormatJSON.cs rename to src/WinGet.RestSource.Utils/Common/FormatJSON.cs index a340e77a..ca878b69 100644 --- a/src/WinGet.RestSource/Common/FormatJSON.cs +++ b/src/WinGet.RestSource.Utils/Common/FormatJSON.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Common +namespace Microsoft.WinGet.RestSource.Utils.Common { using Microsoft.Extensions.Logging; using Newtonsoft.Json; diff --git a/src/WinGet.RestSource/Common/HeaderProcessor.cs b/src/WinGet.RestSource.Utils/Common/HeaderProcessor.cs similarity index 91% rename from src/WinGet.RestSource/Common/HeaderProcessor.cs rename to src/WinGet.RestSource.Utils/Common/HeaderProcessor.cs index c490a437..656784e4 100644 --- a/src/WinGet.RestSource/Common/HeaderProcessor.cs +++ b/src/WinGet.RestSource.Utils/Common/HeaderProcessor.cs @@ -4,15 +4,15 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Common +namespace Microsoft.WinGet.RestSource.Utils.Common { using System.Collections.Generic; using System.Linq; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Primitives; - using Microsoft.WinGet.RestSource.Constants; - using Microsoft.WinGet.RestSource.Exceptions; - using Microsoft.WinGet.RestSource.Models.Errors; + using Microsoft.WinGet.RestSource.Utils.Constants; + using Microsoft.WinGet.RestSource.Utils.Exceptions; + using Microsoft.WinGet.RestSource.Utils.Models.Errors; /// /// Function to assist with processing Headers. diff --git a/src/WinGet.RestSource/Common/IApiDataStore.cs b/src/WinGet.RestSource.Utils/Common/IApiDataStore.cs similarity index 97% rename from src/WinGet.RestSource/Common/IApiDataStore.cs rename to src/WinGet.RestSource.Utils/Common/IApiDataStore.cs index 5903d056..b035c6df 100644 --- a/src/WinGet.RestSource/Common/IApiDataStore.cs +++ b/src/WinGet.RestSource.Utils/Common/IApiDataStore.cs @@ -4,12 +4,12 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Common +namespace Microsoft.WinGet.RestSource.Utils.Common { using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; - using Microsoft.WinGet.RestSource.Models.Schemas; + using Microsoft.WinGet.RestSource.Utils.Models.Schemas; /// /// This provides an interface for IApiDataStore. diff --git a/src/WinGet.RestSource/Common/Parser.cs b/src/WinGet.RestSource.Utils/Common/Parser.cs similarity index 97% rename from src/WinGet.RestSource/Common/Parser.cs rename to src/WinGet.RestSource.Utils/Common/Parser.cs index 94268e52..d7b6a6b4 100644 --- a/src/WinGet.RestSource/Common/Parser.cs +++ b/src/WinGet.RestSource.Utils/Common/Parser.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Common +namespace Microsoft.WinGet.RestSource.Utils.Common { using System.IO; using System.Threading.Tasks; diff --git a/src/WinGet.RestSource/Common/StringEncoder.cs b/src/WinGet.RestSource.Utils/Common/StringEncoder.cs similarity index 95% rename from src/WinGet.RestSource/Common/StringEncoder.cs rename to src/WinGet.RestSource.Utils/Common/StringEncoder.cs index 08a49da8..303e26e2 100644 --- a/src/WinGet.RestSource/Common/StringEncoder.cs +++ b/src/WinGet.RestSource.Utils/Common/StringEncoder.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Common +namespace Microsoft.WinGet.RestSource.Utils.Common { /// /// String Encoder. diff --git a/src/WinGet.RestSource/Common/UnsupportedAndRequiredFieldsHelper.cs b/src/WinGet.RestSource.Utils/Common/UnsupportedAndRequiredFieldsHelper.cs similarity index 93% rename from src/WinGet.RestSource/Common/UnsupportedAndRequiredFieldsHelper.cs rename to src/WinGet.RestSource.Utils/Common/UnsupportedAndRequiredFieldsHelper.cs index 58d85bce..c7000046 100644 --- a/src/WinGet.RestSource/Common/UnsupportedAndRequiredFieldsHelper.cs +++ b/src/WinGet.RestSource.Utils/Common/UnsupportedAndRequiredFieldsHelper.cs @@ -4,13 +4,13 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Common +namespace Microsoft.WinGet.RestSource.Utils.Common { using System.Linq; using Microsoft.AspNetCore.Http; - using Microsoft.WinGet.RestSource.Constants; - using Microsoft.WinGet.RestSource.Models.Arrays; - using Microsoft.WinGet.RestSource.Models.Schemas; + using Microsoft.WinGet.RestSource.Utils.Constants; + using Microsoft.WinGet.RestSource.Utils.Models.Arrays; + using Microsoft.WinGet.RestSource.Utils.Models.Schemas; /// /// Unsupported and required fields helper. diff --git a/src/WinGet.RestSource/Constants/ApiConstants.cs b/src/WinGet.RestSource.Utils/Constants/ApiConstants.cs similarity index 92% rename from src/WinGet.RestSource/Constants/ApiConstants.cs rename to src/WinGet.RestSource.Utils/Constants/ApiConstants.cs index 907aecf2..9ac878b1 100644 --- a/src/WinGet.RestSource/Constants/ApiConstants.cs +++ b/src/WinGet.RestSource.Utils/Constants/ApiConstants.cs @@ -4,10 +4,10 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Constants +namespace Microsoft.WinGet.RestSource.Utils.Constants { using System; - using Microsoft.WinGet.RestSource.Models.Arrays; + using Microsoft.WinGet.RestSource.Utils.Models.Arrays; /// /// API Constants. diff --git a/src/WinGet.RestSource/Constants/CosmosConnectionConstants.cs b/src/WinGet.RestSource.Utils/Constants/CosmosConnectionConstants.cs similarity index 93% rename from src/WinGet.RestSource/Constants/CosmosConnectionConstants.cs rename to src/WinGet.RestSource.Utils/Constants/CosmosConnectionConstants.cs index 55afeda2..d63fc1c1 100644 --- a/src/WinGet.RestSource/Constants/CosmosConnectionConstants.cs +++ b/src/WinGet.RestSource.Utils/Constants/CosmosConnectionConstants.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Constants +namespace Microsoft.WinGet.RestSource.Utils.Constants { /// /// This contains the constants for connecting to Cosmos. diff --git a/src/WinGet.RestSource/Constants/Enumerations/MatchType.cs b/src/WinGet.RestSource.Utils/Constants/Enumerations/MatchType.cs similarity index 91% rename from src/WinGet.RestSource/Constants/Enumerations/MatchType.cs rename to src/WinGet.RestSource.Utils/Constants/Enumerations/MatchType.cs index b79805f7..d7acd5be 100644 --- a/src/WinGet.RestSource/Constants/Enumerations/MatchType.cs +++ b/src/WinGet.RestSource.Utils/Constants/Enumerations/MatchType.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Constants.Enumerations +namespace Microsoft.WinGet.RestSource.Utils.Constants.Enumerations { /// /// Match Type Constants. diff --git a/src/WinGet.RestSource/Constants/Enumerations/PackageMatchFields.cs b/src/WinGet.RestSource.Utils/Constants/Enumerations/PackageMatchFields.cs similarity index 92% rename from src/WinGet.RestSource/Constants/Enumerations/PackageMatchFields.cs rename to src/WinGet.RestSource.Utils/Constants/Enumerations/PackageMatchFields.cs index 6025bfea..b975e9b9 100644 --- a/src/WinGet.RestSource/Constants/Enumerations/PackageMatchFields.cs +++ b/src/WinGet.RestSource.Utils/Constants/Enumerations/PackageMatchFields.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Constants.Enumerations +namespace Microsoft.WinGet.RestSource.Utils.Constants.Enumerations { /// /// Package Match Field Constants. diff --git a/src/WinGet.RestSource/Constants/ErrorConstants.cs b/src/WinGet.RestSource.Utils/Constants/ErrorConstants.cs similarity index 99% rename from src/WinGet.RestSource/Constants/ErrorConstants.cs rename to src/WinGet.RestSource.Utils/Constants/ErrorConstants.cs index 2fb92eb7..43805517 100644 --- a/src/WinGet.RestSource/Constants/ErrorConstants.cs +++ b/src/WinGet.RestSource.Utils/Constants/ErrorConstants.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Constants +namespace Microsoft.WinGet.RestSource.Utils.Constants { /// /// This contains the constants for errors and error codes. diff --git a/src/WinGet.RestSource/Constants/FunctionConstants.cs b/src/WinGet.RestSource.Utils/Constants/FunctionConstants.cs similarity index 98% rename from src/WinGet.RestSource/Constants/FunctionConstants.cs rename to src/WinGet.RestSource.Utils/Constants/FunctionConstants.cs index ad54b579..5dea2790 100644 --- a/src/WinGet.RestSource/Constants/FunctionConstants.cs +++ b/src/WinGet.RestSource.Utils/Constants/FunctionConstants.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Constants +namespace Microsoft.WinGet.RestSource.Utils.Constants { /// /// This contains the constants for functions. diff --git a/src/WinGet.RestSource/Constants/FunctionSettingsConstants.cs b/src/WinGet.RestSource.Utils/Constants/FunctionSettingsConstants.cs similarity index 89% rename from src/WinGet.RestSource/Constants/FunctionSettingsConstants.cs rename to src/WinGet.RestSource.Utils/Constants/FunctionSettingsConstants.cs index d551cc18..282a0a86 100644 --- a/src/WinGet.RestSource/Constants/FunctionSettingsConstants.cs +++ b/src/WinGet.RestSource.Utils/Constants/FunctionSettingsConstants.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Constants +namespace Microsoft.WinGet.RestSource.Utils.Constants { /// /// This contains constants for function settings. diff --git a/src/WinGet.RestSource/Constants/HeaderConstants.cs b/src/WinGet.RestSource.Utils/Constants/HeaderConstants.cs similarity index 89% rename from src/WinGet.RestSource/Constants/HeaderConstants.cs rename to src/WinGet.RestSource.Utils/Constants/HeaderConstants.cs index befdba5c..b85dc471 100644 --- a/src/WinGet.RestSource/Constants/HeaderConstants.cs +++ b/src/WinGet.RestSource.Utils/Constants/HeaderConstants.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Constants +namespace Microsoft.WinGet.RestSource.Utils.Constants { /// /// Header Constants. diff --git a/src/WinGet.RestSource/Constants/QueryConstants.cs b/src/WinGet.RestSource.Utils/Constants/QueryConstants.cs similarity index 91% rename from src/WinGet.RestSource/Constants/QueryConstants.cs rename to src/WinGet.RestSource.Utils/Constants/QueryConstants.cs index 9df16c9b..8cb38b61 100644 --- a/src/WinGet.RestSource/Constants/QueryConstants.cs +++ b/src/WinGet.RestSource.Utils/Constants/QueryConstants.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Constants +namespace Microsoft.WinGet.RestSource.Utils.Constants { /// /// Query Constants. diff --git a/src/WinGet.RestSource/Exceptions/CosmosDatabaseException.cs b/src/WinGet.RestSource.Utils/Exceptions/CosmosDatabaseException.cs similarity index 94% rename from src/WinGet.RestSource/Exceptions/CosmosDatabaseException.cs rename to src/WinGet.RestSource.Utils/Exceptions/CosmosDatabaseException.cs index 242cdedc..1bd2aaaa 100644 --- a/src/WinGet.RestSource/Exceptions/CosmosDatabaseException.cs +++ b/src/WinGet.RestSource.Utils/Exceptions/CosmosDatabaseException.cs @@ -4,10 +4,10 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Exceptions +namespace Microsoft.WinGet.RestSource.Utils.Exceptions { using System; - using Microsoft.WinGet.RestSource.Models.Errors; + using Microsoft.WinGet.RestSource.Utils.Models.Errors; /// /// This is for exceptions that occur with the Cosmos Database Client. diff --git a/src/WinGet.RestSource/Exceptions/DefaultException.cs b/src/WinGet.RestSource.Utils/Exceptions/DefaultException.cs similarity index 94% rename from src/WinGet.RestSource/Exceptions/DefaultException.cs rename to src/WinGet.RestSource.Utils/Exceptions/DefaultException.cs index 93bc9210..dc06b076 100644 --- a/src/WinGet.RestSource/Exceptions/DefaultException.cs +++ b/src/WinGet.RestSource.Utils/Exceptions/DefaultException.cs @@ -4,14 +4,14 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Exceptions +namespace Microsoft.WinGet.RestSource.Utils.Exceptions { using System; using System.Net; using System.Net.Http; using Microsoft.Azure.Cosmos; - using Microsoft.WinGet.RestSource.Constants; - using Microsoft.WinGet.RestSource.Models.Errors; + using Microsoft.WinGet.RestSource.Utils.Constants; + using Microsoft.WinGet.RestSource.Utils.Models.Errors; /// /// This is the base exception for the WinGet.RestSource. diff --git a/src/WinGet.RestSource/Exceptions/InvalidArgumentException.cs b/src/WinGet.RestSource.Utils/Exceptions/InvalidArgumentException.cs similarity index 94% rename from src/WinGet.RestSource/Exceptions/InvalidArgumentException.cs rename to src/WinGet.RestSource.Utils/Exceptions/InvalidArgumentException.cs index a92e6416..e39fd72e 100644 --- a/src/WinGet.RestSource/Exceptions/InvalidArgumentException.cs +++ b/src/WinGet.RestSource.Utils/Exceptions/InvalidArgumentException.cs @@ -4,10 +4,10 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Exceptions +namespace Microsoft.WinGet.RestSource.Utils.Exceptions { using System; - using Microsoft.WinGet.RestSource.Models.Errors; + using Microsoft.WinGet.RestSource.Utils.Models.Errors; /// /// This is for exceptions that occur with the Cosmos Database Client. diff --git a/src/WinGet.RestSource/Models/ApiResponse.cs b/src/WinGet.RestSource.Utils/Models/ApiResponse.cs similarity index 93% rename from src/WinGet.RestSource/Models/ApiResponse.cs rename to src/WinGet.RestSource.Utils/Models/ApiResponse.cs index ff8ede57..fe11ec54 100644 --- a/src/WinGet.RestSource/Models/ApiResponse.cs +++ b/src/WinGet.RestSource.Utils/Models/ApiResponse.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models +namespace Microsoft.WinGet.RestSource.Utils.Models { using Newtonsoft.Json; diff --git a/src/WinGet.RestSource/Models/Arrays/Agreements.cs b/src/WinGet.RestSource.Utils/Models/Arrays/Agreements.cs similarity index 80% rename from src/WinGet.RestSource/Models/Arrays/Agreements.cs rename to src/WinGet.RestSource.Utils/Models/Arrays/Agreements.cs index 682adc34..af29cda3 100644 --- a/src/WinGet.RestSource/Models/Arrays/Agreements.cs +++ b/src/WinGet.RestSource.Utils/Models/Arrays/Agreements.cs @@ -4,11 +4,11 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Arrays +namespace Microsoft.WinGet.RestSource.Utils.Models.Arrays { using System; - using Microsoft.WinGet.RestSource.Models.Core; - using Microsoft.WinGet.RestSource.Validators.StringValidators; + using Microsoft.WinGet.RestSource.Utils.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Validators.StringValidators; /// /// Agreements. diff --git a/src/WinGet.RestSource/Models/Arrays/ApiVersions.cs b/src/WinGet.RestSource.Utils/Models/Arrays/ApiVersions.cs similarity index 81% rename from src/WinGet.RestSource/Models/Arrays/ApiVersions.cs rename to src/WinGet.RestSource.Utils/Models/Arrays/ApiVersions.cs index fafdfcb2..0e0f9470 100644 --- a/src/WinGet.RestSource/Models/Arrays/ApiVersions.cs +++ b/src/WinGet.RestSource.Utils/Models/Arrays/ApiVersions.cs @@ -4,11 +4,11 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Arrays +namespace Microsoft.WinGet.RestSource.Utils.Models.Arrays { using System; - using Microsoft.WinGet.RestSource.Models.Core; - using Microsoft.WinGet.RestSource.Validators.StringValidators; + using Microsoft.WinGet.RestSource.Utils.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Validators.StringValidators; /// /// ApiVersions. diff --git a/src/WinGet.RestSource/Models/Arrays/AppsAndFeaturesEntries.cs b/src/WinGet.RestSource.Utils/Models/Arrays/AppsAndFeaturesEntries.cs similarity index 87% rename from src/WinGet.RestSource/Models/Arrays/AppsAndFeaturesEntries.cs rename to src/WinGet.RestSource.Utils/Models/Arrays/AppsAndFeaturesEntries.cs index 85f1a899..224855b6 100644 --- a/src/WinGet.RestSource/Models/Arrays/AppsAndFeaturesEntries.cs +++ b/src/WinGet.RestSource.Utils/Models/Arrays/AppsAndFeaturesEntries.cs @@ -4,10 +4,10 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Arrays +namespace Microsoft.WinGet.RestSource.Utils.Models.Arrays { using System; - using Microsoft.WinGet.RestSource.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Models.Core; /// /// List of ARP entries. diff --git a/src/WinGet.RestSource/Models/Arrays/Capabilities.cs b/src/WinGet.RestSource.Utils/Models/Arrays/Capabilities.cs similarity index 87% rename from src/WinGet.RestSource/Models/Arrays/Capabilities.cs rename to src/WinGet.RestSource.Utils/Models/Arrays/Capabilities.cs index 0968f1fb..975dd978 100644 --- a/src/WinGet.RestSource/Models/Arrays/Capabilities.cs +++ b/src/WinGet.RestSource.Utils/Models/Arrays/Capabilities.cs @@ -4,10 +4,10 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Arrays +namespace Microsoft.WinGet.RestSource.Utils.Models.Arrays { using System; - using Microsoft.WinGet.RestSource.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Models.Core; /// /// Capabilities. diff --git a/src/WinGet.RestSource/Models/Arrays/Commands.cs b/src/WinGet.RestSource.Utils/Models/Arrays/Commands.cs similarity index 82% rename from src/WinGet.RestSource/Models/Arrays/Commands.cs rename to src/WinGet.RestSource.Utils/Models/Arrays/Commands.cs index d260880d..5d6fbdf6 100644 --- a/src/WinGet.RestSource/Models/Arrays/Commands.cs +++ b/src/WinGet.RestSource.Utils/Models/Arrays/Commands.cs @@ -4,11 +4,11 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Arrays +namespace Microsoft.WinGet.RestSource.Utils.Models.Arrays { using System; - using Microsoft.WinGet.RestSource.Models.Core; - using Microsoft.WinGet.RestSource.Validators.StringValidators; + using Microsoft.WinGet.RestSource.Utils.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Validators.StringValidators; /// /// Commands. diff --git a/src/WinGet.RestSource/Models/Arrays/Dependencies.cs b/src/WinGet.RestSource.Utils/Models/Arrays/Dependencies.cs similarity index 82% rename from src/WinGet.RestSource/Models/Arrays/Dependencies.cs rename to src/WinGet.RestSource.Utils/Models/Arrays/Dependencies.cs index ab1c64d1..5b070b21 100644 --- a/src/WinGet.RestSource/Models/Arrays/Dependencies.cs +++ b/src/WinGet.RestSource.Utils/Models/Arrays/Dependencies.cs @@ -4,11 +4,11 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Arrays +namespace Microsoft.WinGet.RestSource.Utils.Models.Arrays { using System; - using Microsoft.WinGet.RestSource.Models.Core; - using Microsoft.WinGet.RestSource.Validators.StringValidators; + using Microsoft.WinGet.RestSource.Utils.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Validators.StringValidators; /// /// Dependencies. diff --git a/src/WinGet.RestSource/Models/Arrays/ExpectedReturnCodes.cs b/src/WinGet.RestSource.Utils/Models/Arrays/ExpectedReturnCodes.cs similarity index 92% rename from src/WinGet.RestSource/Models/Arrays/ExpectedReturnCodes.cs rename to src/WinGet.RestSource.Utils/Models/Arrays/ExpectedReturnCodes.cs index d52f8285..4b9e1315 100644 --- a/src/WinGet.RestSource/Models/Arrays/ExpectedReturnCodes.cs +++ b/src/WinGet.RestSource.Utils/Models/Arrays/ExpectedReturnCodes.cs @@ -4,11 +4,11 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Arrays +namespace Microsoft.WinGet.RestSource.Utils.Models.Arrays { using System.Collections.Generic; using System.ComponentModel.DataAnnotations; - using Microsoft.WinGet.RestSource.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Models.Core; /// /// List of ExpectedReturnCode. diff --git a/src/WinGet.RestSource/Models/Arrays/FileExtensions.cs b/src/WinGet.RestSource.Utils/Models/Arrays/FileExtensions.cs similarity index 82% rename from src/WinGet.RestSource/Models/Arrays/FileExtensions.cs rename to src/WinGet.RestSource.Utils/Models/Arrays/FileExtensions.cs index ddd20c6b..363afbdc 100644 --- a/src/WinGet.RestSource/Models/Arrays/FileExtensions.cs +++ b/src/WinGet.RestSource.Utils/Models/Arrays/FileExtensions.cs @@ -4,11 +4,11 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Arrays +namespace Microsoft.WinGet.RestSource.Utils.Models.Arrays { using System; - using Microsoft.WinGet.RestSource.Models.Core; - using Microsoft.WinGet.RestSource.Validators.StringValidators; + using Microsoft.WinGet.RestSource.Utils.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Validators.StringValidators; /// /// FileExtensions. diff --git a/src/WinGet.RestSource/Models/Arrays/InstallModes.cs b/src/WinGet.RestSource.Utils/Models/Arrays/InstallModes.cs similarity index 82% rename from src/WinGet.RestSource/Models/Arrays/InstallModes.cs rename to src/WinGet.RestSource.Utils/Models/Arrays/InstallModes.cs index c3140de0..243ae5d5 100644 --- a/src/WinGet.RestSource/Models/Arrays/InstallModes.cs +++ b/src/WinGet.RestSource.Utils/Models/Arrays/InstallModes.cs @@ -4,11 +4,11 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Arrays +namespace Microsoft.WinGet.RestSource.Utils.Models.Arrays { using System; - using Microsoft.WinGet.RestSource.Models.Core; - using Microsoft.WinGet.RestSource.Validators.EnumValidators; + using Microsoft.WinGet.RestSource.Utils.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Validators.EnumValidators; /// /// InstallModes. diff --git a/src/WinGet.RestSource/Models/Arrays/InstallerSuccessCodes.cs b/src/WinGet.RestSource.Utils/Models/Arrays/InstallerSuccessCodes.cs similarity index 93% rename from src/WinGet.RestSource/Models/Arrays/InstallerSuccessCodes.cs rename to src/WinGet.RestSource.Utils/Models/Arrays/InstallerSuccessCodes.cs index 488ee09c..f3243343 100644 --- a/src/WinGet.RestSource/Models/Arrays/InstallerSuccessCodes.cs +++ b/src/WinGet.RestSource.Utils/Models/Arrays/InstallerSuccessCodes.cs @@ -4,11 +4,11 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Arrays +namespace Microsoft.WinGet.RestSource.Utils.Models.Arrays { using System.Collections.Generic; using System.ComponentModel.DataAnnotations; - using Microsoft.WinGet.RestSource.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Models.Core; /// /// InstallerSuccessCodes. diff --git a/src/WinGet.RestSource/Models/Arrays/Markets.cs b/src/WinGet.RestSource.Utils/Models/Arrays/Markets.cs similarity index 81% rename from src/WinGet.RestSource/Models/Arrays/Markets.cs rename to src/WinGet.RestSource.Utils/Models/Arrays/Markets.cs index 87646cab..817c0719 100644 --- a/src/WinGet.RestSource/Models/Arrays/Markets.cs +++ b/src/WinGet.RestSource.Utils/Models/Arrays/Markets.cs @@ -4,11 +4,11 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Arrays +namespace Microsoft.WinGet.RestSource.Utils.Models.Arrays { using System; - using Microsoft.WinGet.RestSource.Models.Core; - using Microsoft.WinGet.RestSource.Validators.StringValidators; + using Microsoft.WinGet.RestSource.Utils.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Validators.StringValidators; /// /// Markets. diff --git a/src/WinGet.RestSource/Models/Arrays/PackageDependency.cs b/src/WinGet.RestSource.Utils/Models/Arrays/PackageDependency.cs similarity index 86% rename from src/WinGet.RestSource/Models/Arrays/PackageDependency.cs rename to src/WinGet.RestSource.Utils/Models/Arrays/PackageDependency.cs index d1a2ad0e..d44e9f9b 100644 --- a/src/WinGet.RestSource/Models/Arrays/PackageDependency.cs +++ b/src/WinGet.RestSource.Utils/Models/Arrays/PackageDependency.cs @@ -4,9 +4,9 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Arrays +namespace Microsoft.WinGet.RestSource.Utils.Models.Arrays { - using Microsoft.WinGet.RestSource.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Models.Core; /// /// PackageDependency. diff --git a/src/WinGet.RestSource/Models/Arrays/PackageFamilyNames.cs b/src/WinGet.RestSource.Utils/Models/Arrays/PackageFamilyNames.cs similarity index 82% rename from src/WinGet.RestSource/Models/Arrays/PackageFamilyNames.cs rename to src/WinGet.RestSource.Utils/Models/Arrays/PackageFamilyNames.cs index f5291229..85cbf839 100644 --- a/src/WinGet.RestSource/Models/Arrays/PackageFamilyNames.cs +++ b/src/WinGet.RestSource.Utils/Models/Arrays/PackageFamilyNames.cs @@ -4,11 +4,11 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Arrays +namespace Microsoft.WinGet.RestSource.Utils.Models.Arrays { using System; - using Microsoft.WinGet.RestSource.Models.Core; - using Microsoft.WinGet.RestSource.Validators.StringValidators; + using Microsoft.WinGet.RestSource.Utils.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Validators.StringValidators; /// /// PackageFamilyNames. diff --git a/src/WinGet.RestSource/Models/Arrays/PackageMatchFields.cs b/src/WinGet.RestSource.Utils/Models/Arrays/PackageMatchFields.cs similarity index 85% rename from src/WinGet.RestSource/Models/Arrays/PackageMatchFields.cs rename to src/WinGet.RestSource.Utils/Models/Arrays/PackageMatchFields.cs index cb30fbd8..af47211c 100644 --- a/src/WinGet.RestSource/Models/Arrays/PackageMatchFields.cs +++ b/src/WinGet.RestSource.Utils/Models/Arrays/PackageMatchFields.cs @@ -4,9 +4,9 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Arrays +namespace Microsoft.WinGet.RestSource.Utils.Models.Arrays { - using Microsoft.WinGet.RestSource.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Models.Core; /// /// PackageMatchFields. diff --git a/src/WinGet.RestSource/Models/Arrays/Platform.cs b/src/WinGet.RestSource.Utils/Models/Arrays/Platform.cs similarity index 83% rename from src/WinGet.RestSource/Models/Arrays/Platform.cs rename to src/WinGet.RestSource.Utils/Models/Arrays/Platform.cs index 9b79adc4..63281b2c 100644 --- a/src/WinGet.RestSource/Models/Arrays/Platform.cs +++ b/src/WinGet.RestSource.Utils/Models/Arrays/Platform.cs @@ -4,11 +4,11 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Arrays +namespace Microsoft.WinGet.RestSource.Utils.Models.Arrays { using System; - using Microsoft.WinGet.RestSource.Models.Core; - using Microsoft.WinGet.RestSource.Validators.EnumValidators; + using Microsoft.WinGet.RestSource.Utils.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Validators.EnumValidators; /// /// Platform. diff --git a/src/WinGet.RestSource/Models/Arrays/ProductCodes.cs b/src/WinGet.RestSource.Utils/Models/Arrays/ProductCodes.cs similarity index 81% rename from src/WinGet.RestSource/Models/Arrays/ProductCodes.cs rename to src/WinGet.RestSource.Utils/Models/Arrays/ProductCodes.cs index 1c003505..0dabb63d 100644 --- a/src/WinGet.RestSource/Models/Arrays/ProductCodes.cs +++ b/src/WinGet.RestSource.Utils/Models/Arrays/ProductCodes.cs @@ -4,11 +4,11 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Arrays +namespace Microsoft.WinGet.RestSource.Utils.Models.Arrays { using System; - using Microsoft.WinGet.RestSource.Models.Core; - using Microsoft.WinGet.RestSource.Validators.StringValidators; + using Microsoft.WinGet.RestSource.Utils.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Validators.StringValidators; /// /// ProductCodes. diff --git a/src/WinGet.RestSource/Models/Arrays/Protocols.cs b/src/WinGet.RestSource.Utils/Models/Arrays/Protocols.cs similarity index 82% rename from src/WinGet.RestSource/Models/Arrays/Protocols.cs rename to src/WinGet.RestSource.Utils/Models/Arrays/Protocols.cs index 85f4e245..5abd8e2d 100644 --- a/src/WinGet.RestSource/Models/Arrays/Protocols.cs +++ b/src/WinGet.RestSource.Utils/Models/Arrays/Protocols.cs @@ -4,11 +4,11 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Arrays +namespace Microsoft.WinGet.RestSource.Utils.Models.Arrays { using System; - using Microsoft.WinGet.RestSource.Models.Core; - using Microsoft.WinGet.RestSource.Validators.StringValidators; + using Microsoft.WinGet.RestSource.Utils.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Validators.StringValidators; /// /// Protocols. diff --git a/src/WinGet.RestSource/Models/Arrays/QueryParameters.cs b/src/WinGet.RestSource.Utils/Models/Arrays/QueryParameters.cs similarity index 85% rename from src/WinGet.RestSource/Models/Arrays/QueryParameters.cs rename to src/WinGet.RestSource.Utils/Models/Arrays/QueryParameters.cs index c6b7f25e..4c4ec6e9 100644 --- a/src/WinGet.RestSource/Models/Arrays/QueryParameters.cs +++ b/src/WinGet.RestSource.Utils/Models/Arrays/QueryParameters.cs @@ -4,9 +4,9 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Arrays +namespace Microsoft.WinGet.RestSource.Utils.Models.Arrays { - using Microsoft.WinGet.RestSource.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Models.Core; /// /// QueryParameters. diff --git a/src/WinGet.RestSource/Models/Arrays/RestrictedCapabilities.cs b/src/WinGet.RestSource.Utils/Models/Arrays/RestrictedCapabilities.cs similarity index 88% rename from src/WinGet.RestSource/Models/Arrays/RestrictedCapabilities.cs rename to src/WinGet.RestSource.Utils/Models/Arrays/RestrictedCapabilities.cs index 3c620c55..257835aa 100644 --- a/src/WinGet.RestSource/Models/Arrays/RestrictedCapabilities.cs +++ b/src/WinGet.RestSource.Utils/Models/Arrays/RestrictedCapabilities.cs @@ -4,10 +4,10 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Arrays +namespace Microsoft.WinGet.RestSource.Utils.Models.Arrays { using System; - using Microsoft.WinGet.RestSource.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Models.Core; /// /// RestrictedCapabilities. diff --git a/src/WinGet.RestSource/Models/Arrays/SearchRequestPackageMatchFilter.cs b/src/WinGet.RestSource.Utils/Models/Arrays/SearchRequestPackageMatchFilter.cs similarity index 86% rename from src/WinGet.RestSource/Models/Arrays/SearchRequestPackageMatchFilter.cs rename to src/WinGet.RestSource.Utils/Models/Arrays/SearchRequestPackageMatchFilter.cs index 3719a55e..6b54ea59 100644 --- a/src/WinGet.RestSource/Models/Arrays/SearchRequestPackageMatchFilter.cs +++ b/src/WinGet.RestSource.Utils/Models/Arrays/SearchRequestPackageMatchFilter.cs @@ -4,9 +4,9 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Arrays +namespace Microsoft.WinGet.RestSource.Utils.Models.Arrays { - using Microsoft.WinGet.RestSource.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Models.Core; /// /// SearchRequestPackageMatchFilter. diff --git a/src/WinGet.RestSource/Models/Arrays/SearchVersions.cs b/src/WinGet.RestSource.Utils/Models/Arrays/SearchVersions.cs similarity index 87% rename from src/WinGet.RestSource/Models/Arrays/SearchVersions.cs rename to src/WinGet.RestSource.Utils/Models/Arrays/SearchVersions.cs index f781f730..e173ccd3 100644 --- a/src/WinGet.RestSource/Models/Arrays/SearchVersions.cs +++ b/src/WinGet.RestSource.Utils/Models/Arrays/SearchVersions.cs @@ -4,10 +4,10 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Arrays +namespace Microsoft.WinGet.RestSource.Utils.Models.Arrays { - using Microsoft.WinGet.RestSource.Models.Core; - using Microsoft.WinGet.RestSource.Models.Objects; + using Microsoft.WinGet.RestSource.Utils.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Models.Objects; /// /// SearchVersions. diff --git a/src/WinGet.RestSource/Models/Arrays/Tags.cs b/src/WinGet.RestSource.Utils/Models/Arrays/Tags.cs similarity index 81% rename from src/WinGet.RestSource/Models/Arrays/Tags.cs rename to src/WinGet.RestSource.Utils/Models/Arrays/Tags.cs index 12276120..5e4e45bd 100644 --- a/src/WinGet.RestSource/Models/Arrays/Tags.cs +++ b/src/WinGet.RestSource.Utils/Models/Arrays/Tags.cs @@ -4,11 +4,11 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Arrays +namespace Microsoft.WinGet.RestSource.Utils.Models.Arrays { using System; - using Microsoft.WinGet.RestSource.Models.Core; - using Microsoft.WinGet.RestSource.Validators.StringValidators; + using Microsoft.WinGet.RestSource.Utils.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Validators.StringValidators; /// /// Tags. diff --git a/src/WinGet.RestSource/Models/Arrays/UnsupportedOSArchitectures.cs b/src/WinGet.RestSource.Utils/Models/Arrays/UnsupportedOSArchitectures.cs similarity index 83% rename from src/WinGet.RestSource/Models/Arrays/UnsupportedOSArchitectures.cs rename to src/WinGet.RestSource.Utils/Models/Arrays/UnsupportedOSArchitectures.cs index 08449804..36f7ed8e 100644 --- a/src/WinGet.RestSource/Models/Arrays/UnsupportedOSArchitectures.cs +++ b/src/WinGet.RestSource.Utils/Models/Arrays/UnsupportedOSArchitectures.cs @@ -4,11 +4,11 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Arrays +namespace Microsoft.WinGet.RestSource.Utils.Models.Arrays { using System; - using Microsoft.WinGet.RestSource.Models.Core; - using Microsoft.WinGet.RestSource.Validators.EnumValidators; + using Microsoft.WinGet.RestSource.Utils.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Validators.EnumValidators; /// /// UnsupportedOSArchitectures. diff --git a/src/WinGet.RestSource/Models/Core/ApiArray.cs b/src/WinGet.RestSource.Utils/Models/Core/ApiArray.cs similarity index 94% rename from src/WinGet.RestSource/Models/Core/ApiArray.cs rename to src/WinGet.RestSource.Utils/Models/Core/ApiArray.cs index 6b9bfd61..e2d70016 100644 --- a/src/WinGet.RestSource/Models/Core/ApiArray.cs +++ b/src/WinGet.RestSource.Utils/Models/Core/ApiArray.cs @@ -4,14 +4,14 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Core +namespace Microsoft.WinGet.RestSource.Utils.Models.Core { using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; - using Microsoft.WinGet.RestSource.Validators; - using Microsoft.WinGet.RestSource.Validators.StringValidators; + using Microsoft.WinGet.RestSource.Utils.Validators; + using Microsoft.WinGet.RestSource.Utils.Validators.StringValidators; /// /// API Array. diff --git a/src/WinGet.RestSource/Models/Core/IApiData.cs b/src/WinGet.RestSource.Utils/Models/Core/IApiData.cs similarity index 88% rename from src/WinGet.RestSource/Models/Core/IApiData.cs rename to src/WinGet.RestSource.Utils/Models/Core/IApiData.cs index 97577db4..377f23fa 100644 --- a/src/WinGet.RestSource/Models/Core/IApiData.cs +++ b/src/WinGet.RestSource.Utils/Models/Core/IApiData.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Core +namespace Microsoft.WinGet.RestSource.Utils.Models.Core { using System; using System.ComponentModel.DataAnnotations; diff --git a/src/WinGet.RestSource/Models/Core/IApiObject.cs b/src/WinGet.RestSource.Utils/Models/Core/IApiObject.cs similarity index 89% rename from src/WinGet.RestSource/Models/Core/IApiObject.cs rename to src/WinGet.RestSource.Utils/Models/Core/IApiObject.cs index 8a11fc7b..3f59cca6 100644 --- a/src/WinGet.RestSource/Models/Core/IApiObject.cs +++ b/src/WinGet.RestSource.Utils/Models/Core/IApiObject.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Core +namespace Microsoft.WinGet.RestSource.Utils.Models.Core { /// /// API Data Interface. diff --git a/src/WinGet.RestSource/Models/Errors/InternalRestError.cs b/src/WinGet.RestSource.Utils/Models/Errors/InternalRestError.cs similarity index 96% rename from src/WinGet.RestSource/Models/Errors/InternalRestError.cs rename to src/WinGet.RestSource.Utils/Models/Errors/InternalRestError.cs index 23c0e972..0b15d8a3 100644 --- a/src/WinGet.RestSource/Models/Errors/InternalRestError.cs +++ b/src/WinGet.RestSource.Utils/Models/Errors/InternalRestError.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Errors +namespace Microsoft.WinGet.RestSource.Utils.Models.Errors { using System; diff --git a/src/WinGet.RestSource/Models/ExtendedSchemas/VersionExtended.cs b/src/WinGet.RestSource.Utils/Models/ExtendedSchemas/VersionExtended.cs similarity index 94% rename from src/WinGet.RestSource/Models/ExtendedSchemas/VersionExtended.cs rename to src/WinGet.RestSource.Utils/Models/ExtendedSchemas/VersionExtended.cs index da12247b..e7565d5c 100644 --- a/src/WinGet.RestSource/Models/ExtendedSchemas/VersionExtended.cs +++ b/src/WinGet.RestSource.Utils/Models/ExtendedSchemas/VersionExtended.cs @@ -4,16 +4,16 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.ExtendedSchemas +namespace Microsoft.WinGet.RestSource.Utils.Models.ExtendedSchemas { using System.Collections.Generic; using System.ComponentModel.DataAnnotations; - using Microsoft.WinGet.RestSource.Constants; - using Microsoft.WinGet.RestSource.Exceptions; - using Microsoft.WinGet.RestSource.Models.Core; - using Microsoft.WinGet.RestSource.Models.Errors; - using Microsoft.WinGet.RestSource.Models.Schemas; - using Microsoft.WinGet.RestSource.Validators; + using Microsoft.WinGet.RestSource.Utils.Constants; + using Microsoft.WinGet.RestSource.Utils.Exceptions; + using Microsoft.WinGet.RestSource.Utils.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Models.Errors; + using Microsoft.WinGet.RestSource.Utils.Models.Schemas; + using Microsoft.WinGet.RestSource.Utils.Validators; using Newtonsoft.Json; /// @@ -281,7 +281,7 @@ public override bool Equals(object obj) /// public override int GetHashCode() { - return System.HashCode.Combine(base.GetHashCode(), this.Installers, this.Locales); + return (base.GetHashCode(), this.Installers, this.Locales).GetHashCode(); } private void AssertInstallersNotNull() diff --git a/src/WinGet.RestSource/Models/ExtendedSchemas/VersionsExtended.cs b/src/WinGet.RestSource.Utils/Models/ExtendedSchemas/VersionsExtended.cs similarity index 93% rename from src/WinGet.RestSource/Models/ExtendedSchemas/VersionsExtended.cs rename to src/WinGet.RestSource.Utils/Models/ExtendedSchemas/VersionsExtended.cs index bb226e4d..2a1063d6 100644 --- a/src/WinGet.RestSource/Models/ExtendedSchemas/VersionsExtended.cs +++ b/src/WinGet.RestSource.Utils/Models/ExtendedSchemas/VersionsExtended.cs @@ -4,17 +4,17 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.ExtendedSchemas +namespace Microsoft.WinGet.RestSource.Utils.Models.ExtendedSchemas { using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; - using Microsoft.WinGet.RestSource.Constants; - using Microsoft.WinGet.RestSource.Exceptions; - using Microsoft.WinGet.RestSource.Models.Core; - using Microsoft.WinGet.RestSource.Models.Errors; - using Microsoft.WinGet.RestSource.Models.Schemas; - using Microsoft.WinGet.RestSource.Validators; + using Microsoft.WinGet.RestSource.Utils.Constants; + using Microsoft.WinGet.RestSource.Utils.Exceptions; + using Microsoft.WinGet.RestSource.Utils.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Models.Errors; + using Microsoft.WinGet.RestSource.Utils.Models.Schemas; + using Microsoft.WinGet.RestSource.Utils.Validators; /// /// VersionsExtended. diff --git a/src/WinGet.RestSource/Models/GetPackageManifestApiResponse.cs b/src/WinGet.RestSource.Utils/Models/GetPackageManifestApiResponse.cs similarity index 87% rename from src/WinGet.RestSource/Models/GetPackageManifestApiResponse.cs rename to src/WinGet.RestSource.Utils/Models/GetPackageManifestApiResponse.cs index e1da6eb4..c64cd271 100644 --- a/src/WinGet.RestSource/Models/GetPackageManifestApiResponse.cs +++ b/src/WinGet.RestSource.Utils/Models/GetPackageManifestApiResponse.cs @@ -4,10 +4,10 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Common +namespace Microsoft.WinGet.RestSource.Utils.Common { - using Microsoft.WinGet.RestSource.Models; - using Microsoft.WinGet.RestSource.Models.Arrays; + using Microsoft.WinGet.RestSource.Utils.Models; + using Microsoft.WinGet.RestSource.Utils.Models.Arrays; using Newtonsoft.Json; /// diff --git a/src/WinGet.RestSource/Models/ManifestSearch.cs b/src/WinGet.RestSource.Utils/Models/ManifestSearch.cs similarity index 94% rename from src/WinGet.RestSource/Models/ManifestSearch.cs rename to src/WinGet.RestSource.Utils/Models/ManifestSearch.cs index 7dd57dfe..dd4d61ca 100644 --- a/src/WinGet.RestSource/Models/ManifestSearch.cs +++ b/src/WinGet.RestSource.Utils/Models/ManifestSearch.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models +namespace Microsoft.WinGet.RestSource.Utils.Models { /// /// Manifest Search Schema. diff --git a/src/WinGet.RestSource/Models/Objects/AppsAndFeatures.cs b/src/WinGet.RestSource.Utils/Models/Objects/AppsAndFeatures.cs similarity index 87% rename from src/WinGet.RestSource/Models/Objects/AppsAndFeatures.cs rename to src/WinGet.RestSource.Utils/Models/Objects/AppsAndFeatures.cs index 41cd2c17..9641a2c3 100644 --- a/src/WinGet.RestSource/Models/Objects/AppsAndFeatures.cs +++ b/src/WinGet.RestSource.Utils/Models/Objects/AppsAndFeatures.cs @@ -4,14 +4,14 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Objects +namespace Microsoft.WinGet.RestSource.Utils.Models.Objects { using System.Collections.Generic; using System.ComponentModel.DataAnnotations; - using Microsoft.WinGet.RestSource.Constants; - using Microsoft.WinGet.RestSource.Models.Core; - using Microsoft.WinGet.RestSource.Validators.EnumValidators; - using Microsoft.WinGet.RestSource.Validators.StringValidators; + using Microsoft.WinGet.RestSource.Utils.Constants; + using Microsoft.WinGet.RestSource.Utils.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Validators.EnumValidators; + using Microsoft.WinGet.RestSource.Utils.Validators.StringValidators; /// /// AppsAndFeatures. @@ -140,7 +140,7 @@ public override bool Equals(object obj) /// public override int GetHashCode() { - return System.HashCode.Combine(this.DisplayName, this.Publisher, this.DisplayVersion, this.ProductCode, this.UpgradeCode, this.InstallerType); + return (this.DisplayName, this.Publisher, this.DisplayVersion, this.ProductCode, this.UpgradeCode, this.InstallerType).GetHashCode(); } } } diff --git a/src/WinGet.RestSource/Models/Objects/Dependencies.cs b/src/WinGet.RestSource.Utils/Models/Objects/Dependencies.cs similarity index 89% rename from src/WinGet.RestSource/Models/Objects/Dependencies.cs rename to src/WinGet.RestSource.Utils/Models/Objects/Dependencies.cs index c4432bdc..e8ba9f8a 100644 --- a/src/WinGet.RestSource/Models/Objects/Dependencies.cs +++ b/src/WinGet.RestSource.Utils/Models/Objects/Dependencies.cs @@ -4,13 +4,13 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Objects +namespace Microsoft.WinGet.RestSource.Utils.Models.Objects { using System.Collections.Generic; using System.ComponentModel.DataAnnotations; - using Microsoft.WinGet.RestSource.Constants; - using Microsoft.WinGet.RestSource.Models.Core; - using Microsoft.WinGet.RestSource.Validators; + using Microsoft.WinGet.RestSource.Utils.Constants; + using Microsoft.WinGet.RestSource.Utils.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Validators; /// /// Dependencies. @@ -131,7 +131,7 @@ public override bool Equals(object obj) /// public override int GetHashCode() { - return System.HashCode.Combine(this.WindowsFeatures, this.WindowsLibraries, this.PackageDependencies, this.ExternalDependencies); + return (this.WindowsFeatures, this.WindowsLibraries, this.PackageDependencies, this.ExternalDependencies).GetHashCode(); } } } diff --git a/src/WinGet.RestSource/Models/Objects/ExpectedReturnCode.cs b/src/WinGet.RestSource.Utils/Models/Objects/ExpectedReturnCode.cs similarity index 88% rename from src/WinGet.RestSource/Models/Objects/ExpectedReturnCode.cs rename to src/WinGet.RestSource.Utils/Models/Objects/ExpectedReturnCode.cs index 7527f54b..e121a104 100644 --- a/src/WinGet.RestSource/Models/Objects/ExpectedReturnCode.cs +++ b/src/WinGet.RestSource.Utils/Models/Objects/ExpectedReturnCode.cs @@ -4,14 +4,14 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Objects +namespace Microsoft.WinGet.RestSource.Utils.Models.Objects { using System.Collections.Generic; using System.ComponentModel.DataAnnotations; - using Microsoft.WinGet.RestSource.Constants; - using Microsoft.WinGet.RestSource.Models.Arrays; - using Microsoft.WinGet.RestSource.Models.Core; - using Microsoft.WinGet.RestSource.Validators.EnumValidators; + using Microsoft.WinGet.RestSource.Utils.Constants; + using Microsoft.WinGet.RestSource.Utils.Models.Arrays; + using Microsoft.WinGet.RestSource.Utils.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Validators.EnumValidators; /// /// ExpectedReturnCode. @@ -114,7 +114,7 @@ public override bool Equals(object obj) /// public override int GetHashCode() { - return System.HashCode.Combine(this.InstallerReturnCode, this.ReturnResponse); + return (this.InstallerReturnCode, this.ReturnResponse).GetHashCode(); } } } diff --git a/src/WinGet.RestSource/Models/Objects/InstallerSwitches.cs b/src/WinGet.RestSource.Utils/Models/Objects/InstallerSwitches.cs similarity index 89% rename from src/WinGet.RestSource/Models/Objects/InstallerSwitches.cs rename to src/WinGet.RestSource.Utils/Models/Objects/InstallerSwitches.cs index fdab5db1..488b9447 100644 --- a/src/WinGet.RestSource/Models/Objects/InstallerSwitches.cs +++ b/src/WinGet.RestSource.Utils/Models/Objects/InstallerSwitches.cs @@ -4,13 +4,13 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Objects +namespace Microsoft.WinGet.RestSource.Utils.Models.Objects { using System.Collections.Generic; using System.ComponentModel.DataAnnotations; - using Microsoft.WinGet.RestSource.Constants; - using Microsoft.WinGet.RestSource.Models.Core; - using Microsoft.WinGet.RestSource.Validators.StringValidators; + using Microsoft.WinGet.RestSource.Utils.Constants; + using Microsoft.WinGet.RestSource.Utils.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Validators.StringValidators; /// /// InstallerSwitches. @@ -146,7 +146,7 @@ public override bool Equals(object obj) /// public override int GetHashCode() { - return System.HashCode.Combine(this.Silent, this.SilentWithProgress, this.Interactive, this.InstallLocation, this.Log, this.Upgrade, this.Custom); + return (this.Silent, this.SilentWithProgress, this.Interactive, this.InstallLocation, this.Log, this.Upgrade, this.Custom).GetHashCode(); } } } diff --git a/src/WinGet.RestSource/Models/Objects/Markets.cs b/src/WinGet.RestSource.Utils/Models/Objects/Markets.cs similarity index 85% rename from src/WinGet.RestSource/Models/Objects/Markets.cs rename to src/WinGet.RestSource.Utils/Models/Objects/Markets.cs index 5f70d3b4..794cb9e2 100644 --- a/src/WinGet.RestSource/Models/Objects/Markets.cs +++ b/src/WinGet.RestSource.Utils/Models/Objects/Markets.cs @@ -4,16 +4,16 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Objects +namespace Microsoft.WinGet.RestSource.Utils.Models.Objects { using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; - using Microsoft.WinGet.RestSource.Constants; - using Microsoft.WinGet.RestSource.Models.Core; - using Microsoft.WinGet.RestSource.Validators; - using Microsoft.WinGet.RestSource.Validators.EnumValidators; - using Microsoft.WinGet.RestSource.Validators.StringValidators; + using Microsoft.WinGet.RestSource.Utils.Constants; + using Microsoft.WinGet.RestSource.Utils.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Validators; + using Microsoft.WinGet.RestSource.Utils.Validators.EnumValidators; + using Microsoft.WinGet.RestSource.Utils.Validators.StringValidators; /// /// Markets. @@ -116,7 +116,7 @@ public override bool Equals(object obj) /// public override int GetHashCode() { - return System.HashCode.Combine(this.AllowedMarkets, this.ExcludedMarkets); + return (this.AllowedMarkets, this.ExcludedMarkets).GetHashCode(); } } } diff --git a/src/WinGet.RestSource/Models/Objects/PackageDependency.cs b/src/WinGet.RestSource.Utils/Models/Objects/PackageDependency.cs similarity index 88% rename from src/WinGet.RestSource/Models/Objects/PackageDependency.cs rename to src/WinGet.RestSource.Utils/Models/Objects/PackageDependency.cs index 9b1bf694..19e94ce4 100644 --- a/src/WinGet.RestSource/Models/Objects/PackageDependency.cs +++ b/src/WinGet.RestSource.Utils/Models/Objects/PackageDependency.cs @@ -4,13 +4,13 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Objects +namespace Microsoft.WinGet.RestSource.Utils.Models.Objects { using System.Collections.Generic; using System.ComponentModel.DataAnnotations; - using Microsoft.WinGet.RestSource.Constants; - using Microsoft.WinGet.RestSource.Models.Core; - using Microsoft.WinGet.RestSource.Validators.StringValidators; + using Microsoft.WinGet.RestSource.Utils.Constants; + using Microsoft.WinGet.RestSource.Utils.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Validators.StringValidators; /// /// PackageDependency. @@ -99,7 +99,7 @@ public override bool Equals(object obj) /// public override int GetHashCode() { - return System.HashCode.Combine(this.PackageIdentifier, this.MinimumVersion); + return (this.PackageIdentifier, this.MinimumVersion).GetHashCode(); } } } diff --git a/src/WinGet.RestSource/Models/Objects/SearchRequestMatch.cs b/src/WinGet.RestSource.Utils/Models/Objects/SearchRequestMatch.cs similarity index 86% rename from src/WinGet.RestSource/Models/Objects/SearchRequestMatch.cs rename to src/WinGet.RestSource.Utils/Models/Objects/SearchRequestMatch.cs index e96db5ab..d4ecd0f8 100644 --- a/src/WinGet.RestSource/Models/Objects/SearchRequestMatch.cs +++ b/src/WinGet.RestSource.Utils/Models/Objects/SearchRequestMatch.cs @@ -4,14 +4,14 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Objects +namespace Microsoft.WinGet.RestSource.Utils.Models.Objects { using System.Collections.Generic; using System.ComponentModel.DataAnnotations; - using Microsoft.WinGet.RestSource.Constants; - using Microsoft.WinGet.RestSource.Models.Core; - using Microsoft.WinGet.RestSource.Validators.EnumValidators; - using Microsoft.WinGet.RestSource.Validators.StringValidators; + using Microsoft.WinGet.RestSource.Utils.Constants; + using Microsoft.WinGet.RestSource.Utils.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Validators.EnumValidators; + using Microsoft.WinGet.RestSource.Utils.Validators.StringValidators; /// /// SearchRequestMatch. @@ -100,7 +100,7 @@ public override bool Equals(object obj) /// public override int GetHashCode() { - return System.HashCode.Combine(this.MatchType, this.KeyWord); + return (this.MatchType, this.KeyWord).GetHashCode(); } } } diff --git a/src/WinGet.RestSource/Models/Objects/SearchRequestPackageMatchFilter.cs b/src/WinGet.RestSource.Utils/Models/Objects/SearchRequestPackageMatchFilter.cs similarity index 89% rename from src/WinGet.RestSource/Models/Objects/SearchRequestPackageMatchFilter.cs rename to src/WinGet.RestSource.Utils/Models/Objects/SearchRequestPackageMatchFilter.cs index 999ee2f9..20a4d69f 100644 --- a/src/WinGet.RestSource/Models/Objects/SearchRequestPackageMatchFilter.cs +++ b/src/WinGet.RestSource.Utils/Models/Objects/SearchRequestPackageMatchFilter.cs @@ -4,14 +4,14 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Objects +namespace Microsoft.WinGet.RestSource.Utils.Models.Objects { using System.Collections.Generic; using System.ComponentModel.DataAnnotations; - using Microsoft.WinGet.RestSource.Constants; - using Microsoft.WinGet.RestSource.Models.Core; - using Microsoft.WinGet.RestSource.Validators; - using Microsoft.WinGet.RestSource.Validators.EnumValidators; + using Microsoft.WinGet.RestSource.Utils.Constants; + using Microsoft.WinGet.RestSource.Utils.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Validators; + using Microsoft.WinGet.RestSource.Utils.Validators.EnumValidators; /// /// SearchRequestPackageMatchFilter. @@ -113,7 +113,7 @@ public override bool Equals(object obj) /// public override int GetHashCode() { - return System.HashCode.Combine(this.RequestMatch, this.PackageMatchField); + return (this.RequestMatch, this.PackageMatchField).GetHashCode(); } } } diff --git a/src/WinGet.RestSource/Models/Objects/SearchVersion.cs b/src/WinGet.RestSource.Utils/Models/Objects/SearchVersion.cs similarity index 88% rename from src/WinGet.RestSource/Models/Objects/SearchVersion.cs rename to src/WinGet.RestSource.Utils/Models/Objects/SearchVersion.cs index 28b13bb9..dcadf171 100644 --- a/src/WinGet.RestSource/Models/Objects/SearchVersion.cs +++ b/src/WinGet.RestSource.Utils/Models/Objects/SearchVersion.cs @@ -4,15 +4,15 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Objects +namespace Microsoft.WinGet.RestSource.Utils.Models.Objects { using System.Collections.Generic; using System.ComponentModel.DataAnnotations; - using Microsoft.WinGet.RestSource.Constants; - using Microsoft.WinGet.RestSource.Models.Arrays; - using Microsoft.WinGet.RestSource.Models.Core; - using Microsoft.WinGet.RestSource.Validators; - using Microsoft.WinGet.RestSource.Validators.StringValidators; + using Microsoft.WinGet.RestSource.Utils.Constants; + using Microsoft.WinGet.RestSource.Utils.Models.Arrays; + using Microsoft.WinGet.RestSource.Utils.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Validators; + using Microsoft.WinGet.RestSource.Utils.Validators.StringValidators; /// /// SearchVersion. @@ -153,7 +153,7 @@ public override bool Equals(object obj) /// public override int GetHashCode() { - return System.HashCode.Combine(this.PackageVersion, this.Channel, this.PackageFamilyNames, this.ProductCodes); + return (this.PackageVersion, this.Channel, this.PackageFamilyNames, this.ProductCodes).GetHashCode(); } } } diff --git a/src/WinGet.RestSource/Models/Objects/SourceAgreement.cs b/src/WinGet.RestSource.Utils/Models/Objects/SourceAgreement.cs similarity index 88% rename from src/WinGet.RestSource/Models/Objects/SourceAgreement.cs rename to src/WinGet.RestSource.Utils/Models/Objects/SourceAgreement.cs index 099184e7..e189a8a4 100644 --- a/src/WinGet.RestSource/Models/Objects/SourceAgreement.cs +++ b/src/WinGet.RestSource.Utils/Models/Objects/SourceAgreement.cs @@ -4,13 +4,13 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Objects +namespace Microsoft.WinGet.RestSource.Utils.Models.Objects { using System.Collections.Generic; using System.ComponentModel.DataAnnotations; - using Microsoft.WinGet.RestSource.Constants; - using Microsoft.WinGet.RestSource.Models.Core; - using Microsoft.WinGet.RestSource.Validators.StringValidators; + using Microsoft.WinGet.RestSource.Utils.Constants; + using Microsoft.WinGet.RestSource.Utils.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Validators.StringValidators; /// /// SourceAgreement. @@ -115,7 +115,7 @@ public override bool Equals(object obj) /// public override int GetHashCode() { - return System.HashCode.Combine(this.AgreementLabel, this.Agreement, this.AgreementUrl); + return (this.AgreementLabel, this.Agreement, this.AgreementUrl).GetHashCode(); } } } diff --git a/src/WinGet.RestSource/Models/Objects/SourceAgreementExtended.cs b/src/WinGet.RestSource.Utils/Models/Objects/SourceAgreementExtended.cs similarity index 87% rename from src/WinGet.RestSource/Models/Objects/SourceAgreementExtended.cs rename to src/WinGet.RestSource.Utils/Models/Objects/SourceAgreementExtended.cs index b5da747b..d5ffcb42 100644 --- a/src/WinGet.RestSource/Models/Objects/SourceAgreementExtended.cs +++ b/src/WinGet.RestSource.Utils/Models/Objects/SourceAgreementExtended.cs @@ -4,14 +4,14 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Objects +namespace Microsoft.WinGet.RestSource.Utils.Models.Objects { using System.Collections.Generic; using System.ComponentModel.DataAnnotations; - using Microsoft.WinGet.RestSource.Constants; - using Microsoft.WinGet.RestSource.Models.Arrays; - using Microsoft.WinGet.RestSource.Models.Core; - using Microsoft.WinGet.RestSource.Validators.StringValidators; + using Microsoft.WinGet.RestSource.Utils.Constants; + using Microsoft.WinGet.RestSource.Utils.Models.Arrays; + using Microsoft.WinGet.RestSource.Utils.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Validators.StringValidators; /// /// SourceAgreementExtended. @@ -93,7 +93,7 @@ public override bool Equals(object obj) /// public override int GetHashCode() { - return System.HashCode.Combine(this.Agreements, this.AgreementsIdentifier); + return (this.Agreements, this.AgreementsIdentifier).GetHashCode(); } /// diff --git a/src/WinGet.RestSource/Models/Schemas/DefaultLocale.cs b/src/WinGet.RestSource.Utils/Models/Schemas/DefaultLocale.cs similarity index 89% rename from src/WinGet.RestSource/Models/Schemas/DefaultLocale.cs rename to src/WinGet.RestSource.Utils/Models/Schemas/DefaultLocale.cs index 5f01d453..c2aeeb26 100644 --- a/src/WinGet.RestSource/Models/Schemas/DefaultLocale.cs +++ b/src/WinGet.RestSource.Utils/Models/Schemas/DefaultLocale.cs @@ -4,13 +4,13 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Schemas +namespace Microsoft.WinGet.RestSource.Utils.Models.Schemas { using System.Collections.Generic; using System.ComponentModel.DataAnnotations; - using Microsoft.WinGet.RestSource.Constants; - using Microsoft.WinGet.RestSource.Models.Core; - using Microsoft.WinGet.RestSource.Validators.StringValidators; + using Microsoft.WinGet.RestSource.Utils.Constants; + using Microsoft.WinGet.RestSource.Utils.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Validators.StringValidators; /// /// Locale. @@ -127,7 +127,7 @@ public override bool Equals(object obj) /// public override int GetHashCode() { - return System.HashCode.Combine(base.GetHashCode(), this.Moniker); + return (base.GetHashCode(), this.Moniker).GetHashCode(); } } } diff --git a/src/WinGet.RestSource/Models/Schemas/Information.cs b/src/WinGet.RestSource.Utils/Models/Schemas/Information.cs similarity index 86% rename from src/WinGet.RestSource/Models/Schemas/Information.cs rename to src/WinGet.RestSource.Utils/Models/Schemas/Information.cs index 1a44b715..afca62b1 100644 --- a/src/WinGet.RestSource/Models/Schemas/Information.cs +++ b/src/WinGet.RestSource.Utils/Models/Schemas/Information.cs @@ -4,12 +4,12 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Schemas +namespace Microsoft.WinGet.RestSource.Utils.Models.Schemas { - using Microsoft.WinGet.RestSource.Constants; - using Microsoft.WinGet.RestSource.Models.Arrays; - using Microsoft.WinGet.RestSource.Models.Objects; - using Microsoft.WinGet.RestSource.Validators.StringValidators; + using Microsoft.WinGet.RestSource.Utils.Constants; + using Microsoft.WinGet.RestSource.Utils.Models.Arrays; + using Microsoft.WinGet.RestSource.Utils.Models.Objects; + using Microsoft.WinGet.RestSource.Utils.Validators.StringValidators; /// /// Server Information. diff --git a/src/WinGet.RestSource/Models/Schemas/Installer.cs b/src/WinGet.RestSource.Utils/Models/Schemas/Installer.cs similarity index 83% rename from src/WinGet.RestSource/Models/Schemas/Installer.cs rename to src/WinGet.RestSource.Utils/Models/Schemas/Installer.cs index d7d10d08..d625d565 100644 --- a/src/WinGet.RestSource/Models/Schemas/Installer.cs +++ b/src/WinGet.RestSource.Utils/Models/Schemas/Installer.cs @@ -4,25 +4,25 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Schemas +namespace Microsoft.WinGet.RestSource.Utils.Models.Schemas { using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; - using Microsoft.WinGet.RestSource.Constants; - using Microsoft.WinGet.RestSource.Models.Arrays; - using Microsoft.WinGet.RestSource.Models.Core; - using Microsoft.WinGet.RestSource.Models.Objects; - using Microsoft.WinGet.RestSource.Validators; - using Microsoft.WinGet.RestSource.Validators.DateTimeValidators; - using Microsoft.WinGet.RestSource.Validators.EnumValidators; - using Microsoft.WinGet.RestSource.Validators.StringValidators; - using Capabilities = Microsoft.WinGet.RestSource.Models.Arrays.Capabilities; - using Commands = Microsoft.WinGet.RestSource.Models.Arrays.Commands; - using Dependencies = Microsoft.WinGet.RestSource.Models.Objects.Dependencies; - using FileExtensions = Microsoft.WinGet.RestSource.Models.Arrays.FileExtensions; - using Platform = Microsoft.WinGet.RestSource.Models.Arrays.Platform; - using Protocols = Microsoft.WinGet.RestSource.Models.Arrays.Protocols; + using Microsoft.WinGet.RestSource.Utils.Constants; + using Microsoft.WinGet.RestSource.Utils.Models.Arrays; + using Microsoft.WinGet.RestSource.Utils.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Models.Objects; + using Microsoft.WinGet.RestSource.Utils.Validators; + using Microsoft.WinGet.RestSource.Utils.Validators.DateTimeValidators; + using Microsoft.WinGet.RestSource.Utils.Validators.EnumValidators; + using Microsoft.WinGet.RestSource.Utils.Validators.StringValidators; + using Capabilities = Microsoft.WinGet.RestSource.Utils.Models.Arrays.Capabilities; + using Commands = Microsoft.WinGet.RestSource.Utils.Models.Arrays.Commands; + using Dependencies = Microsoft.WinGet.RestSource.Utils.Models.Objects.Dependencies; + using FileExtensions = Microsoft.WinGet.RestSource.Utils.Models.Arrays.FileExtensions; + using Platform = Microsoft.WinGet.RestSource.Utils.Models.Arrays.Platform; + using Protocols = Microsoft.WinGet.RestSource.Utils.Models.Arrays.Protocols; /// /// Installer. @@ -430,40 +430,38 @@ public override bool Equals(object obj) /// public override int GetHashCode() { - HashCode hashCode = default; - hashCode.Add(this.InstallerIdentifier); - hashCode.Add(this.InstallerSha256); - hashCode.Add(this.InstallerUrl); - hashCode.Add(this.Architecture); - hashCode.Add(this.InstallerLocale); - hashCode.Add(this.Platform); - hashCode.Add(this.MinimumOsVersion); - hashCode.Add(this.InstallerType); - hashCode.Add(this.Scope); - hashCode.Add(this.SignatureSha256); - hashCode.Add(this.InstallModes); - hashCode.Add(this.InstallerSwitches); - hashCode.Add(this.InstallerSuccessCodes); - hashCode.Add(this.ExpectedReturnCodes); - hashCode.Add(this.UpgradeBehavior); - hashCode.Add(this.Commands); - hashCode.Add(this.Protocols); - hashCode.Add(this.FileExtensions); - hashCode.Add(this.Dependencies); - hashCode.Add(this.PackageFamilyName); - hashCode.Add(this.ProductCode); - hashCode.Add(this.Capabilities); - hashCode.Add(this.RestrictedCapabilities); - hashCode.Add(this.MSStoreProductIdentifier); - hashCode.Add(this.InstallerAbortsTerminal); - hashCode.Add(this.ReleaseDate); - hashCode.Add(this.InstallLocationRequired); - hashCode.Add(this.RequireExplicitUpgrade); - hashCode.Add(this.ElevationRequirement); - hashCode.Add(this.UnsupportedOSArchitectures); - hashCode.Add(this.AppsAndFeaturesEntries); - hashCode.Add(this.Markets); - return hashCode.ToHashCode(); + return (this.InstallerIdentifier, + this.InstallerSha256, + this.InstallerUrl, + this.Architecture, + this.InstallerLocale, + this.Platform, + this.MinimumOsVersion, + this.InstallerType, + this.Scope, + this.SignatureSha256, + this.InstallModes, + this.InstallerSwitches, + this.InstallerSuccessCodes, + this.ExpectedReturnCodes, + this.UpgradeBehavior, + this.Commands, + this.Protocols, + this.FileExtensions, + this.Dependencies, + this.PackageFamilyName, + this.ProductCode, + this.Capabilities, + this.RestrictedCapabilities, + this.MSStoreProductIdentifier, + this.InstallerAbortsTerminal, + this.ReleaseDate, + this.InstallLocationRequired, + this.RequireExplicitUpgrade, + this.ElevationRequirement, + this.UnsupportedOSArchitectures, + this.AppsAndFeaturesEntries, + this.Markets).GetHashCode(); } } } diff --git a/src/WinGet.RestSource/Models/Schemas/Installers.cs b/src/WinGet.RestSource.Utils/Models/Schemas/Installers.cs similarity index 91% rename from src/WinGet.RestSource/Models/Schemas/Installers.cs rename to src/WinGet.RestSource.Utils/Models/Schemas/Installers.cs index abd096fe..fa3b9de8 100644 --- a/src/WinGet.RestSource/Models/Schemas/Installers.cs +++ b/src/WinGet.RestSource.Utils/Models/Schemas/Installers.cs @@ -4,16 +4,16 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Schemas +namespace Microsoft.WinGet.RestSource.Utils.Models.Schemas { using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; - using Microsoft.WinGet.RestSource.Constants; - using Microsoft.WinGet.RestSource.Exceptions; - using Microsoft.WinGet.RestSource.Models.Core; - using Microsoft.WinGet.RestSource.Models.Errors; - using Microsoft.WinGet.RestSource.Validators; + using Microsoft.WinGet.RestSource.Utils.Constants; + using Microsoft.WinGet.RestSource.Utils.Exceptions; + using Microsoft.WinGet.RestSource.Utils.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Models.Errors; + using Microsoft.WinGet.RestSource.Utils.Validators; /// /// Installers. diff --git a/src/WinGet.RestSource/Models/Schemas/Locale.cs b/src/WinGet.RestSource.Utils/Models/Schemas/Locale.cs similarity index 84% rename from src/WinGet.RestSource/Models/Schemas/Locale.cs rename to src/WinGet.RestSource.Utils/Models/Schemas/Locale.cs index 2fa4a4dc..0ea03021 100644 --- a/src/WinGet.RestSource/Models/Schemas/Locale.cs +++ b/src/WinGet.RestSource.Utils/Models/Schemas/Locale.cs @@ -4,14 +4,14 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Schemas +namespace Microsoft.WinGet.RestSource.Utils.Models.Schemas { using System.Collections.Generic; using System.ComponentModel.DataAnnotations; - using Microsoft.WinGet.RestSource.Models.Arrays; - using Microsoft.WinGet.RestSource.Models.Core; - using Microsoft.WinGet.RestSource.Validators; - using Microsoft.WinGet.RestSource.Validators.StringValidators; + using Microsoft.WinGet.RestSource.Utils.Models.Arrays; + using Microsoft.WinGet.RestSource.Utils.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Validators; + using Microsoft.WinGet.RestSource.Utils.Validators.StringValidators; /// /// Locale. @@ -247,26 +247,24 @@ public override bool Equals(object obj) /// public override int GetHashCode() { - System.HashCode hash = default; - hash.Add(this.PackageLocale); - hash.Add(this.Publisher); - hash.Add(this.PublisherUrl); - hash.Add(this.PublisherSupportUrl); - hash.Add(this.PrivacyUrl); - hash.Add(this.Author); - hash.Add(this.PackageName); - hash.Add(this.PackageUrl); - hash.Add(this.License); - hash.Add(this.LicenseUrl); - hash.Add(this.Copyright); - hash.Add(this.CopyrightUrl); - hash.Add(this.ShortDescription); - hash.Add(this.Description); - hash.Add(this.Tags); - hash.Add(this.ReleaseNotes); - hash.Add(this.ReleaseNotesUrl); - hash.Add(this.Agreements); - return hash.ToHashCode(); + return (this.PackageLocale, + this.Publisher, + this.PublisherUrl, + this.PublisherSupportUrl, + this.PrivacyUrl, + this.Author, + this.PackageName, + this.PackageUrl, + this.License, + this.LicenseUrl, + this.Copyright, + this.CopyrightUrl, + this.ShortDescription, + this.Description, + this.Tags, + this.ReleaseNotes, + this.ReleaseNotesUrl, + this.Agreements).GetHashCode(); } } } diff --git a/src/WinGet.RestSource/Models/Schemas/Locales.cs b/src/WinGet.RestSource.Utils/Models/Schemas/Locales.cs similarity index 90% rename from src/WinGet.RestSource/Models/Schemas/Locales.cs rename to src/WinGet.RestSource.Utils/Models/Schemas/Locales.cs index 93f5fd35..31da7a27 100644 --- a/src/WinGet.RestSource/Models/Schemas/Locales.cs +++ b/src/WinGet.RestSource.Utils/Models/Schemas/Locales.cs @@ -4,16 +4,16 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Schemas +namespace Microsoft.WinGet.RestSource.Utils.Models.Schemas { using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; - using Microsoft.WinGet.RestSource.Constants; - using Microsoft.WinGet.RestSource.Exceptions; - using Microsoft.WinGet.RestSource.Models.Core; - using Microsoft.WinGet.RestSource.Models.Errors; - using Microsoft.WinGet.RestSource.Validators; + using Microsoft.WinGet.RestSource.Utils.Constants; + using Microsoft.WinGet.RestSource.Utils.Exceptions; + using Microsoft.WinGet.RestSource.Utils.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Models.Errors; + using Microsoft.WinGet.RestSource.Utils.Validators; /// /// Locales. diff --git a/src/WinGet.RestSource/Models/Schemas/ManifestSearchRequest.cs b/src/WinGet.RestSource.Utils/Models/Schemas/ManifestSearchRequest.cs similarity index 88% rename from src/WinGet.RestSource/Models/Schemas/ManifestSearchRequest.cs rename to src/WinGet.RestSource.Utils/Models/Schemas/ManifestSearchRequest.cs index 96c9adb8..b74973de 100644 --- a/src/WinGet.RestSource/Models/Schemas/ManifestSearchRequest.cs +++ b/src/WinGet.RestSource.Utils/Models/Schemas/ManifestSearchRequest.cs @@ -4,12 +4,14 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Schemas +namespace Microsoft.WinGet.RestSource.Utils.Models.Schemas { using System.Collections.Generic; using System.ComponentModel.DataAnnotations; - using Microsoft.WinGet.RestSource.Models.Core; - using Microsoft.WinGet.RestSource.Validators; + using Microsoft.WinGet.RestSource.Utils.Constants; + using Microsoft.WinGet.RestSource.Utils.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Validators; + using Microsoft.WinGet.RestSource.Utils.Validators.StringValidators; /// /// ManifestSearchRequest. @@ -144,7 +146,7 @@ public override bool Equals(object obj) /// public override int GetHashCode() { - return System.HashCode.Combine(this.MaximumResults, this.FetchAllManifests, this.Query, this.Inclusions, this.Filters); + return (this.MaximumResults, this.FetchAllManifests, this.Query, this.Inclusions, this.Filters).GetHashCode(); } } } diff --git a/src/WinGet.RestSource/Models/Schemas/ManifestSearchResponse.cs b/src/WinGet.RestSource.Utils/Models/Schemas/ManifestSearchResponse.cs similarity index 92% rename from src/WinGet.RestSource/Models/Schemas/ManifestSearchResponse.cs rename to src/WinGet.RestSource.Utils/Models/Schemas/ManifestSearchResponse.cs index 1038fdf7..ec0c947c 100644 --- a/src/WinGet.RestSource/Models/Schemas/ManifestSearchResponse.cs +++ b/src/WinGet.RestSource.Utils/Models/Schemas/ManifestSearchResponse.cs @@ -4,19 +4,19 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Schemas +namespace Microsoft.WinGet.RestSource.Utils.Models.Schemas { using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; - using Microsoft.WinGet.RestSource.Constants; - using Microsoft.WinGet.RestSource.Models.Arrays; - using Microsoft.WinGet.RestSource.Models.Core; - using Microsoft.WinGet.RestSource.Models.ExtendedSchemas; - using Microsoft.WinGet.RestSource.Models.Objects; - using Microsoft.WinGet.RestSource.Validators; - using Microsoft.WinGet.RestSource.Validators.StringValidators; + using Microsoft.WinGet.RestSource.Utils.Constants; + using Microsoft.WinGet.RestSource.Utils.Models.Arrays; + using Microsoft.WinGet.RestSource.Utils.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Models.ExtendedSchemas; + using Microsoft.WinGet.RestSource.Utils.Models.Objects; + using Microsoft.WinGet.RestSource.Utils.Validators; + using Microsoft.WinGet.RestSource.Utils.Validators.StringValidators; /// /// Manifest Search Response. @@ -339,7 +339,7 @@ public override bool Equals(object obj) /// public override int GetHashCode() { - return System.HashCode.Combine(this.PackageIdentifier, this.PackageName, this.Publisher, this.Versions); + return (this.PackageIdentifier, this.PackageName, this.Publisher, this.Versions).GetHashCode(); } } } diff --git a/src/WinGet.RestSource/Models/Schemas/Package.cs b/src/WinGet.RestSource.Utils/Models/Schemas/Package.cs similarity index 90% rename from src/WinGet.RestSource/Models/Schemas/Package.cs rename to src/WinGet.RestSource.Utils/Models/Schemas/Package.cs index 4db84224..da041cfe 100644 --- a/src/WinGet.RestSource/Models/Schemas/Package.cs +++ b/src/WinGet.RestSource.Utils/Models/Schemas/Package.cs @@ -4,12 +4,12 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Schemas +namespace Microsoft.WinGet.RestSource.Utils.Models.Schemas { using System.Collections.Generic; using System.ComponentModel.DataAnnotations; - using Microsoft.WinGet.RestSource.Models.Core; - using Microsoft.WinGet.RestSource.Validators.StringValidators; + using Microsoft.WinGet.RestSource.Utils.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Validators.StringValidators; /// /// PackageCore. diff --git a/src/WinGet.RestSource/Models/Schemas/PackageManifest.cs b/src/WinGet.RestSource.Utils/Models/Schemas/PackageManifest.cs similarity index 96% rename from src/WinGet.RestSource/Models/Schemas/PackageManifest.cs rename to src/WinGet.RestSource.Utils/Models/Schemas/PackageManifest.cs index 5b425ad3..84e18705 100644 --- a/src/WinGet.RestSource/Models/Schemas/PackageManifest.cs +++ b/src/WinGet.RestSource.Utils/Models/Schemas/PackageManifest.cs @@ -4,16 +4,16 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Schemas +namespace Microsoft.WinGet.RestSource.Utils.Models.Schemas { using System.Collections.Generic; using System.ComponentModel.DataAnnotations; - using Microsoft.WinGet.RestSource.Constants; - using Microsoft.WinGet.RestSource.Exceptions; - using Microsoft.WinGet.RestSource.Models.Core; - using Microsoft.WinGet.RestSource.Models.Errors; - using Microsoft.WinGet.RestSource.Models.ExtendedSchemas; - using Microsoft.WinGet.RestSource.Validators; + using Microsoft.WinGet.RestSource.Utils.Constants; + using Microsoft.WinGet.RestSource.Utils.Exceptions; + using Microsoft.WinGet.RestSource.Utils.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Models.Errors; + using Microsoft.WinGet.RestSource.Utils.Models.ExtendedSchemas; + using Microsoft.WinGet.RestSource.Utils.Validators; using Newtonsoft.Json; /// diff --git a/src/WinGet.RestSource/Models/Schemas/Version.cs b/src/WinGet.RestSource.Utils/Models/Schemas/Version.cs similarity index 90% rename from src/WinGet.RestSource/Models/Schemas/Version.cs rename to src/WinGet.RestSource.Utils/Models/Schemas/Version.cs index 49285e48..466c7fb8 100644 --- a/src/WinGet.RestSource/Models/Schemas/Version.cs +++ b/src/WinGet.RestSource.Utils/Models/Schemas/Version.cs @@ -4,14 +4,14 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Schemas +namespace Microsoft.WinGet.RestSource.Utils.Models.Schemas { using System.Collections.Generic; using System.ComponentModel.DataAnnotations; - using Microsoft.WinGet.RestSource.Constants; - using Microsoft.WinGet.RestSource.Models.Core; - using Microsoft.WinGet.RestSource.Validators; - using Microsoft.WinGet.RestSource.Validators.StringValidators; + using Microsoft.WinGet.RestSource.Utils.Constants; + using Microsoft.WinGet.RestSource.Utils.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Validators; + using Microsoft.WinGet.RestSource.Utils.Validators.StringValidators; /// /// This is the core version model. @@ -128,7 +128,7 @@ public override bool Equals(object obj) /// public override int GetHashCode() { - return System.HashCode.Combine(this.PackageVersion, this.Channel, this.DefaultLocale); + return (this.PackageVersion, this.Channel, this.DefaultLocale).GetHashCode(); } } } diff --git a/src/WinGet.RestSource/Models/Schemas/Versions.cs b/src/WinGet.RestSource.Utils/Models/Schemas/Versions.cs similarity index 84% rename from src/WinGet.RestSource/Models/Schemas/Versions.cs rename to src/WinGet.RestSource.Utils/Models/Schemas/Versions.cs index a711b546..3fbc8df2 100644 --- a/src/WinGet.RestSource/Models/Schemas/Versions.cs +++ b/src/WinGet.RestSource.Utils/Models/Schemas/Versions.cs @@ -4,9 +4,9 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.Schemas +namespace Microsoft.WinGet.RestSource.Utils.Models.Schemas { - using Microsoft.WinGet.RestSource.Models.Core; + using Microsoft.WinGet.RestSource.Utils.Models.Core; /// /// Versions. diff --git a/src/WinGet.RestSource/Models/SearchApiResponse.cs b/src/WinGet.RestSource.Utils/Models/SearchApiResponse.cs similarity index 84% rename from src/WinGet.RestSource/Models/SearchApiResponse.cs rename to src/WinGet.RestSource.Utils/Models/SearchApiResponse.cs index e666ea5f..5d6d5d93 100644 --- a/src/WinGet.RestSource/Models/SearchApiResponse.cs +++ b/src/WinGet.RestSource.Utils/Models/SearchApiResponse.cs @@ -4,11 +4,11 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Common +namespace Microsoft.WinGet.RestSource.Utils.Common { - using Microsoft.WinGet.RestSource.Constants; - using Microsoft.WinGet.RestSource.Models; - using Microsoft.WinGet.RestSource.Models.Arrays; + using Microsoft.WinGet.RestSource.Utils.Constants; + using Microsoft.WinGet.RestSource.Utils.Models; + using Microsoft.WinGet.RestSource.Utils.Models.Arrays; using Newtonsoft.Json; /// diff --git a/src/WinGet.RestSource/Validators/ApiDataValidator.cs b/src/WinGet.RestSource.Utils/Validators/ApiDataValidator.cs similarity index 91% rename from src/WinGet.RestSource/Validators/ApiDataValidator.cs rename to src/WinGet.RestSource.Utils/Validators/ApiDataValidator.cs index 78dec562..9fdda73d 100644 --- a/src/WinGet.RestSource/Validators/ApiDataValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/ApiDataValidator.cs @@ -4,14 +4,14 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators +namespace Microsoft.WinGet.RestSource.Utils.Validators { using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; - using Microsoft.WinGet.RestSource.Constants; - using Microsoft.WinGet.RestSource.Exceptions; - using Microsoft.WinGet.RestSource.Models.Errors; + using Microsoft.WinGet.RestSource.Utils.Constants; + using Microsoft.WinGet.RestSource.Utils.Exceptions; + using Microsoft.WinGet.RestSource.Utils.Models.Errors; /// /// This class holds our common validation process. diff --git a/src/WinGet.RestSource/Validators/DateTimeValidators/ApiDateTimeValidator.cs b/src/WinGet.RestSource.Utils/Validators/DateTimeValidators/ApiDateTimeValidator.cs similarity index 95% rename from src/WinGet.RestSource/Validators/DateTimeValidators/ApiDateTimeValidator.cs rename to src/WinGet.RestSource.Utils/Validators/DateTimeValidators/ApiDateTimeValidator.cs index 9d0882e2..987027e4 100644 --- a/src/WinGet.RestSource/Validators/DateTimeValidators/ApiDateTimeValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/DateTimeValidators/ApiDateTimeValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.DateTimeValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.DateTimeValidators { using System; using System.ComponentModel.DataAnnotations; diff --git a/src/WinGet.RestSource/Validators/DateTimeValidators/ReleaseDateValidator.cs b/src/WinGet.RestSource.Utils/Validators/DateTimeValidators/ReleaseDateValidator.cs similarity index 88% rename from src/WinGet.RestSource/Validators/DateTimeValidators/ReleaseDateValidator.cs rename to src/WinGet.RestSource.Utils/Validators/DateTimeValidators/ReleaseDateValidator.cs index abef139b..e7892bf6 100644 --- a/src/WinGet.RestSource/Validators/DateTimeValidators/ReleaseDateValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/DateTimeValidators/ReleaseDateValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.DateTimeValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.DateTimeValidators { /// /// ReleaseDateValidator. diff --git a/src/WinGet.RestSource/Validators/EnumValidators/ApiEnumValidator.cs b/src/WinGet.RestSource.Utils/Validators/EnumValidators/ApiEnumValidator.cs similarity index 92% rename from src/WinGet.RestSource/Validators/EnumValidators/ApiEnumValidator.cs rename to src/WinGet.RestSource.Utils/Validators/EnumValidators/ApiEnumValidator.cs index d19b35cb..69657fb9 100644 --- a/src/WinGet.RestSource/Validators/EnumValidators/ApiEnumValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/EnumValidators/ApiEnumValidator.cs @@ -4,14 +4,14 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.EnumValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.EnumValidators { using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; - using Microsoft.WinGet.RestSource.Common; - using Microsoft.WinGet.RestSource.Validators.StringValidators; + using Microsoft.WinGet.RestSource.Utils.Common; + using Microsoft.WinGet.RestSource.Utils.Validators.StringValidators; /// /// ApiEnumValidator. diff --git a/src/WinGet.RestSource/Validators/EnumValidators/ArchitectureValidator.cs b/src/WinGet.RestSource.Utils/Validators/EnumValidators/ArchitectureValidator.cs similarity index 90% rename from src/WinGet.RestSource/Validators/EnumValidators/ArchitectureValidator.cs rename to src/WinGet.RestSource.Utils/Validators/EnumValidators/ArchitectureValidator.cs index 12d66ec9..6d9f4637 100644 --- a/src/WinGet.RestSource/Validators/EnumValidators/ArchitectureValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/EnumValidators/ArchitectureValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.EnumValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.EnumValidators { using System.Collections.Generic; diff --git a/src/WinGet.RestSource/Validators/EnumValidators/ElevationRequirementValidator.cs b/src/WinGet.RestSource.Utils/Validators/EnumValidators/ElevationRequirementValidator.cs similarity index 90% rename from src/WinGet.RestSource/Validators/EnumValidators/ElevationRequirementValidator.cs rename to src/WinGet.RestSource.Utils/Validators/EnumValidators/ElevationRequirementValidator.cs index 0171b373..29e07eca 100644 --- a/src/WinGet.RestSource/Validators/EnumValidators/ElevationRequirementValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/EnumValidators/ElevationRequirementValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.EnumValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.EnumValidators { using System.Collections.Generic; diff --git a/src/WinGet.RestSource/Validators/EnumValidators/ExpectedReturnCodeResponseValidator.cs b/src/WinGet.RestSource.Utils/Validators/EnumValidators/ExpectedReturnCodeResponseValidator.cs similarity index 92% rename from src/WinGet.RestSource/Validators/EnumValidators/ExpectedReturnCodeResponseValidator.cs rename to src/WinGet.RestSource.Utils/Validators/EnumValidators/ExpectedReturnCodeResponseValidator.cs index 48cf38c4..31ea1c26 100644 --- a/src/WinGet.RestSource/Validators/EnumValidators/ExpectedReturnCodeResponseValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/EnumValidators/ExpectedReturnCodeResponseValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.EnumValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.EnumValidators { using System.Collections.Generic; diff --git a/src/WinGet.RestSource/Validators/EnumValidators/InstallModeValidator.cs b/src/WinGet.RestSource.Utils/Validators/EnumValidators/InstallModeValidator.cs similarity index 90% rename from src/WinGet.RestSource/Validators/EnumValidators/InstallModeValidator.cs rename to src/WinGet.RestSource.Utils/Validators/EnumValidators/InstallModeValidator.cs index 084a75bf..147a0d18 100644 --- a/src/WinGet.RestSource/Validators/EnumValidators/InstallModeValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/EnumValidators/InstallModeValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.EnumValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.EnumValidators { using System.Collections.Generic; diff --git a/src/WinGet.RestSource/Validators/EnumValidators/InstallerTypeValidator.cs b/src/WinGet.RestSource.Utils/Validators/EnumValidators/InstallerTypeValidator.cs similarity index 91% rename from src/WinGet.RestSource/Validators/EnumValidators/InstallerTypeValidator.cs rename to src/WinGet.RestSource.Utils/Validators/EnumValidators/InstallerTypeValidator.cs index fca7aa2d..93764265 100644 --- a/src/WinGet.RestSource/Validators/EnumValidators/InstallerTypeValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/EnumValidators/InstallerTypeValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.EnumValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.EnumValidators { using System.Collections.Generic; diff --git a/src/WinGet.RestSource/Validators/EnumValidators/MatchTypeValidator.cs b/src/WinGet.RestSource.Utils/Validators/EnumValidators/MatchTypeValidator.cs similarity index 86% rename from src/WinGet.RestSource/Validators/EnumValidators/MatchTypeValidator.cs rename to src/WinGet.RestSource.Utils/Validators/EnumValidators/MatchTypeValidator.cs index 0f766115..6c700579 100644 --- a/src/WinGet.RestSource/Validators/EnumValidators/MatchTypeValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/EnumValidators/MatchTypeValidator.cs @@ -4,10 +4,10 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.EnumValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.EnumValidators { using System.Collections.Generic; - using Microsoft.WinGet.RestSource.Constants.Enumerations; + using Microsoft.WinGet.RestSource.Utils.Constants.Enumerations; /// /// MatchTypeValidatorSchema. diff --git a/src/WinGet.RestSource/Validators/EnumValidators/PackageMatchFieldValidator.cs b/src/WinGet.RestSource.Utils/Validators/EnumValidators/PackageMatchFieldValidator.cs similarity index 87% rename from src/WinGet.RestSource/Validators/EnumValidators/PackageMatchFieldValidator.cs rename to src/WinGet.RestSource.Utils/Validators/EnumValidators/PackageMatchFieldValidator.cs index 229ceadd..dca8b033 100644 --- a/src/WinGet.RestSource/Validators/EnumValidators/PackageMatchFieldValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/EnumValidators/PackageMatchFieldValidator.cs @@ -4,10 +4,10 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.EnumValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.EnumValidators { using System.Collections.Generic; - using Microsoft.WinGet.RestSource.Constants.Enumerations; + using Microsoft.WinGet.RestSource.Utils.Constants.Enumerations; /// /// PackageMatchFieldValidator. diff --git a/src/WinGet.RestSource/Validators/EnumValidators/PlatformValidator.cs b/src/WinGet.RestSource.Utils/Validators/EnumValidators/PlatformValidator.cs similarity index 89% rename from src/WinGet.RestSource/Validators/EnumValidators/PlatformValidator.cs rename to src/WinGet.RestSource.Utils/Validators/EnumValidators/PlatformValidator.cs index 77ab8603..1e1b4b41 100644 --- a/src/WinGet.RestSource/Validators/EnumValidators/PlatformValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/EnumValidators/PlatformValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.EnumValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.EnumValidators { using System.Collections.Generic; diff --git a/src/WinGet.RestSource/Validators/EnumValidators/ScopeValidator.cs b/src/WinGet.RestSource.Utils/Validators/EnumValidators/ScopeValidator.cs similarity index 89% rename from src/WinGet.RestSource/Validators/EnumValidators/ScopeValidator.cs rename to src/WinGet.RestSource.Utils/Validators/EnumValidators/ScopeValidator.cs index 0e3f4c9d..10d81db5 100644 --- a/src/WinGet.RestSource/Validators/EnumValidators/ScopeValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/EnumValidators/ScopeValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.EnumValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.EnumValidators { using System.Collections.Generic; diff --git a/src/WinGet.RestSource/Validators/EnumValidators/UnsupportedOSArchitecturesValidator.cs b/src/WinGet.RestSource.Utils/Validators/EnumValidators/UnsupportedOSArchitecturesValidator.cs similarity index 90% rename from src/WinGet.RestSource/Validators/EnumValidators/UnsupportedOSArchitecturesValidator.cs rename to src/WinGet.RestSource.Utils/Validators/EnumValidators/UnsupportedOSArchitecturesValidator.cs index 245f6439..3e3edde1 100644 --- a/src/WinGet.RestSource/Validators/EnumValidators/UnsupportedOSArchitecturesValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/EnumValidators/UnsupportedOSArchitecturesValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.EnumValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.EnumValidators { using System.Collections.Generic; diff --git a/src/WinGet.RestSource/Validators/EnumValidators/UpgradeBehaviorValidator.cs b/src/WinGet.RestSource.Utils/Validators/EnumValidators/UpgradeBehaviorValidator.cs similarity index 90% rename from src/WinGet.RestSource/Validators/EnumValidators/UpgradeBehaviorValidator.cs rename to src/WinGet.RestSource.Utils/Validators/EnumValidators/UpgradeBehaviorValidator.cs index 29f2f55f..a9a07766 100644 --- a/src/WinGet.RestSource/Validators/EnumValidators/UpgradeBehaviorValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/EnumValidators/UpgradeBehaviorValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.EnumValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.EnumValidators { using System.Collections.Generic; diff --git a/src/WinGet.RestSource/Validators/StringValidators/AgreementLabelValidator.cs b/src/WinGet.RestSource.Utils/Validators/StringValidators/AgreementLabelValidator.cs similarity index 89% rename from src/WinGet.RestSource/Validators/StringValidators/AgreementLabelValidator.cs rename to src/WinGet.RestSource.Utils/Validators/StringValidators/AgreementLabelValidator.cs index d2842dec..fed14b0f 100644 --- a/src/WinGet.RestSource/Validators/StringValidators/AgreementLabelValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/StringValidators/AgreementLabelValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.StringValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.StringValidators { /// /// AgreementLabelValidator. diff --git a/src/WinGet.RestSource/Validators/StringValidators/AgreementValidator.cs b/src/WinGet.RestSource.Utils/Validators/StringValidators/AgreementValidator.cs similarity index 89% rename from src/WinGet.RestSource/Validators/StringValidators/AgreementValidator.cs rename to src/WinGet.RestSource.Utils/Validators/StringValidators/AgreementValidator.cs index d8d6a9ba..df58cbc5 100644 --- a/src/WinGet.RestSource/Validators/StringValidators/AgreementValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/StringValidators/AgreementValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.StringValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.StringValidators { /// /// AgreementValidator. diff --git a/src/WinGet.RestSource/Validators/StringValidators/AgreementsIdentifierValidator.cs b/src/WinGet.RestSource.Utils/Validators/StringValidators/AgreementsIdentifierValidator.cs similarity index 90% rename from src/WinGet.RestSource/Validators/StringValidators/AgreementsIdentifierValidator.cs rename to src/WinGet.RestSource.Utils/Validators/StringValidators/AgreementsIdentifierValidator.cs index f97cc429..9ded7d59 100644 --- a/src/WinGet.RestSource/Validators/StringValidators/AgreementsIdentifierValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/StringValidators/AgreementsIdentifierValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.StringValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.StringValidators { /// /// AgreementIdentifierValidator. diff --git a/src/WinGet.RestSource/Validators/StringValidators/ApiStringValidator.cs b/src/WinGet.RestSource.Utils/Validators/StringValidators/ApiStringValidator.cs similarity index 95% rename from src/WinGet.RestSource/Validators/StringValidators/ApiStringValidator.cs rename to src/WinGet.RestSource.Utils/Validators/StringValidators/ApiStringValidator.cs index 4e4e1128..a261c6f8 100644 --- a/src/WinGet.RestSource/Validators/StringValidators/ApiStringValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/StringValidators/ApiStringValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.StringValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.StringValidators { using System.ComponentModel.DataAnnotations; using System.Text.RegularExpressions; diff --git a/src/WinGet.RestSource/Validators/StringValidators/ApiVersionValidator.cs b/src/WinGet.RestSource.Utils/Validators/StringValidators/ApiVersionValidator.cs similarity index 89% rename from src/WinGet.RestSource/Validators/StringValidators/ApiVersionValidator.cs rename to src/WinGet.RestSource.Utils/Validators/StringValidators/ApiVersionValidator.cs index 612f9baf..178d2eda 100644 --- a/src/WinGet.RestSource/Validators/StringValidators/ApiVersionValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/StringValidators/ApiVersionValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.StringValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.StringValidators { /// /// ApiVersionValidator. diff --git a/src/WinGet.RestSource/Validators/StringValidators/AuthorValidator.cs b/src/WinGet.RestSource.Utils/Validators/StringValidators/AuthorValidator.cs similarity index 89% rename from src/WinGet.RestSource/Validators/StringValidators/AuthorValidator.cs rename to src/WinGet.RestSource.Utils/Validators/StringValidators/AuthorValidator.cs index b97fd998..ff631e2f 100644 --- a/src/WinGet.RestSource/Validators/StringValidators/AuthorValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/StringValidators/AuthorValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.StringValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.StringValidators { /// /// AuthorValidator. diff --git a/src/WinGet.RestSource/Validators/StringValidators/CapabilitiesValidator.cs b/src/WinGet.RestSource.Utils/Validators/StringValidators/CapabilitiesValidator.cs similarity index 89% rename from src/WinGet.RestSource/Validators/StringValidators/CapabilitiesValidator.cs rename to src/WinGet.RestSource.Utils/Validators/StringValidators/CapabilitiesValidator.cs index 53856f68..a08f83e8 100644 --- a/src/WinGet.RestSource/Validators/StringValidators/CapabilitiesValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/StringValidators/CapabilitiesValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.StringValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.StringValidators { /// /// CapabilitiesValidator. diff --git a/src/WinGet.RestSource/Validators/StringValidators/ChannelValidator.cs b/src/WinGet.RestSource.Utils/Validators/StringValidators/ChannelValidator.cs similarity index 89% rename from src/WinGet.RestSource/Validators/StringValidators/ChannelValidator.cs rename to src/WinGet.RestSource.Utils/Validators/StringValidators/ChannelValidator.cs index 8079b24a..3f1866dc 100644 --- a/src/WinGet.RestSource/Validators/StringValidators/ChannelValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/StringValidators/ChannelValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.StringValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.StringValidators { /// /// ChannelValidator. diff --git a/src/WinGet.RestSource/Validators/StringValidators/CommandsValidator.cs b/src/WinGet.RestSource.Utils/Validators/StringValidators/CommandsValidator.cs similarity index 88% rename from src/WinGet.RestSource/Validators/StringValidators/CommandsValidator.cs rename to src/WinGet.RestSource.Utils/Validators/StringValidators/CommandsValidator.cs index 57d87fea..50f300d9 100644 --- a/src/WinGet.RestSource/Validators/StringValidators/CommandsValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/StringValidators/CommandsValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.StringValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.StringValidators { /// /// CommandsValidator. diff --git a/src/WinGet.RestSource/Validators/StringValidators/ContinuationTokenValidator.cs b/src/WinGet.RestSource.Utils/Validators/StringValidators/ContinuationTokenValidator.cs similarity index 88% rename from src/WinGet.RestSource/Validators/StringValidators/ContinuationTokenValidator.cs rename to src/WinGet.RestSource.Utils/Validators/StringValidators/ContinuationTokenValidator.cs index 7d6d1fc4..99428346 100644 --- a/src/WinGet.RestSource/Validators/StringValidators/ContinuationTokenValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/StringValidators/ContinuationTokenValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.StringValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.StringValidators { /// /// ContinuationTokenValidator. diff --git a/src/WinGet.RestSource/Validators/StringValidators/CopyrightValidator.cs b/src/WinGet.RestSource.Utils/Validators/StringValidators/CopyrightValidator.cs similarity index 89% rename from src/WinGet.RestSource/Validators/StringValidators/CopyrightValidator.cs rename to src/WinGet.RestSource.Utils/Validators/StringValidators/CopyrightValidator.cs index 172bd52a..98f6535a 100644 --- a/src/WinGet.RestSource/Validators/StringValidators/CopyrightValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/StringValidators/CopyrightValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.StringValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.StringValidators { /// /// CopyrightValidator. diff --git a/src/WinGet.RestSource/Validators/StringValidators/CustomSwitchValidator.cs b/src/WinGet.RestSource.Utils/Validators/StringValidators/CustomSwitchValidator.cs similarity index 89% rename from src/WinGet.RestSource/Validators/StringValidators/CustomSwitchValidator.cs rename to src/WinGet.RestSource.Utils/Validators/StringValidators/CustomSwitchValidator.cs index 62a4e6f9..fb9fc248 100644 --- a/src/WinGet.RestSource/Validators/StringValidators/CustomSwitchValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/StringValidators/CustomSwitchValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.StringValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.StringValidators { /// /// CustomSwitchValidator. diff --git a/src/WinGet.RestSource/Validators/StringValidators/DependenciesValidator.cs b/src/WinGet.RestSource.Utils/Validators/StringValidators/DependenciesValidator.cs similarity index 89% rename from src/WinGet.RestSource/Validators/StringValidators/DependenciesValidator.cs rename to src/WinGet.RestSource.Utils/Validators/StringValidators/DependenciesValidator.cs index a998f3d4..35ec7a21 100644 --- a/src/WinGet.RestSource/Validators/StringValidators/DependenciesValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/StringValidators/DependenciesValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.StringValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.StringValidators { /// /// Dependencies. diff --git a/src/WinGet.RestSource/Validators/StringValidators/DescriptionValidator.cs b/src/WinGet.RestSource.Utils/Validators/StringValidators/DescriptionValidator.cs similarity index 89% rename from src/WinGet.RestSource/Validators/StringValidators/DescriptionValidator.cs rename to src/WinGet.RestSource.Utils/Validators/StringValidators/DescriptionValidator.cs index 2e0c3735..ed418b1f 100644 --- a/src/WinGet.RestSource/Validators/StringValidators/DescriptionValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/StringValidators/DescriptionValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.StringValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.StringValidators { /// /// DescriptionValidator. diff --git a/src/WinGet.RestSource/Validators/StringValidators/DisplayAndPublisherNameValidator.cs b/src/WinGet.RestSource.Utils/Validators/StringValidators/DisplayAndPublisherNameValidator.cs similarity index 90% rename from src/WinGet.RestSource/Validators/StringValidators/DisplayAndPublisherNameValidator.cs rename to src/WinGet.RestSource.Utils/Validators/StringValidators/DisplayAndPublisherNameValidator.cs index 126f1967..6f008afd 100644 --- a/src/WinGet.RestSource/Validators/StringValidators/DisplayAndPublisherNameValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/StringValidators/DisplayAndPublisherNameValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.StringValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.StringValidators { /// /// DisplayAndPublisherNameValidator. diff --git a/src/WinGet.RestSource/Validators/StringValidators/DisplayVersionValidator.cs b/src/WinGet.RestSource.Utils/Validators/StringValidators/DisplayVersionValidator.cs similarity index 89% rename from src/WinGet.RestSource/Validators/StringValidators/DisplayVersionValidator.cs rename to src/WinGet.RestSource.Utils/Validators/StringValidators/DisplayVersionValidator.cs index 6f224f6e..82b399dd 100644 --- a/src/WinGet.RestSource/Validators/StringValidators/DisplayVersionValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/StringValidators/DisplayVersionValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.StringValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.StringValidators { /// /// DisplayVersionValidator. diff --git a/src/WinGet.RestSource/Validators/StringValidators/FileExtensionsValidator.cs b/src/WinGet.RestSource.Utils/Validators/StringValidators/FileExtensionsValidator.cs similarity index 89% rename from src/WinGet.RestSource/Validators/StringValidators/FileExtensionsValidator.cs rename to src/WinGet.RestSource.Utils/Validators/StringValidators/FileExtensionsValidator.cs index 29aee20e..08d226c2 100644 --- a/src/WinGet.RestSource/Validators/StringValidators/FileExtensionsValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/StringValidators/FileExtensionsValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.StringValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.StringValidators { /// /// FileExtensionsValidator. diff --git a/src/WinGet.RestSource/Validators/StringValidators/IApiStringValidator.cs b/src/WinGet.RestSource.Utils/Validators/StringValidators/IApiStringValidator.cs similarity index 89% rename from src/WinGet.RestSource/Validators/StringValidators/IApiStringValidator.cs rename to src/WinGet.RestSource.Utils/Validators/StringValidators/IApiStringValidator.cs index 53a3650b..52d5c9c5 100644 --- a/src/WinGet.RestSource/Validators/StringValidators/IApiStringValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/StringValidators/IApiStringValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.StringValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.StringValidators { using System.ComponentModel.DataAnnotations; diff --git a/src/WinGet.RestSource/Validators/StringValidators/InstallerIdentifierValidator.cs b/src/WinGet.RestSource.Utils/Validators/StringValidators/InstallerIdentifierValidator.cs similarity index 89% rename from src/WinGet.RestSource/Validators/StringValidators/InstallerIdentifierValidator.cs rename to src/WinGet.RestSource.Utils/Validators/StringValidators/InstallerIdentifierValidator.cs index 845ca3c5..4916b0c7 100644 --- a/src/WinGet.RestSource/Validators/StringValidators/InstallerIdentifierValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/StringValidators/InstallerIdentifierValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.StringValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.StringValidators { /// /// InstallerIdentifierValidatorValidator. diff --git a/src/WinGet.RestSource/Validators/StringValidators/InstallerSha256Validator.cs b/src/WinGet.RestSource.Utils/Validators/StringValidators/InstallerSha256Validator.cs similarity index 89% rename from src/WinGet.RestSource/Validators/StringValidators/InstallerSha256Validator.cs rename to src/WinGet.RestSource.Utils/Validators/StringValidators/InstallerSha256Validator.cs index 7336a01b..b059e552 100644 --- a/src/WinGet.RestSource/Validators/StringValidators/InstallerSha256Validator.cs +++ b/src/WinGet.RestSource.Utils/Validators/StringValidators/InstallerSha256Validator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.StringValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.StringValidators { /// /// InstallerSha256. diff --git a/src/WinGet.RestSource/Validators/StringValidators/KeyWordValidator.cs b/src/WinGet.RestSource.Utils/Validators/StringValidators/KeyWordValidator.cs similarity index 88% rename from src/WinGet.RestSource/Validators/StringValidators/KeyWordValidator.cs rename to src/WinGet.RestSource.Utils/Validators/StringValidators/KeyWordValidator.cs index 481ca49f..ff055e33 100644 --- a/src/WinGet.RestSource/Validators/StringValidators/KeyWordValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/StringValidators/KeyWordValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.StringValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.StringValidators { /// /// KeyWordValidator. diff --git a/src/WinGet.RestSource/Validators/StringValidators/LicenseValidator.cs b/src/WinGet.RestSource.Utils/Validators/StringValidators/LicenseValidator.cs similarity index 89% rename from src/WinGet.RestSource/Validators/StringValidators/LicenseValidator.cs rename to src/WinGet.RestSource.Utils/Validators/StringValidators/LicenseValidator.cs index 8a274311..765eb967 100644 --- a/src/WinGet.RestSource/Validators/StringValidators/LicenseValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/StringValidators/LicenseValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.StringValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.StringValidators { /// /// LicenseValidator. diff --git a/src/WinGet.RestSource/Validators/StringValidators/LocaleValidator.cs b/src/WinGet.RestSource.Utils/Validators/StringValidators/LocaleValidator.cs similarity index 90% rename from src/WinGet.RestSource/Validators/StringValidators/LocaleValidator.cs rename to src/WinGet.RestSource.Utils/Validators/StringValidators/LocaleValidator.cs index 36e30c06..af23a5c3 100644 --- a/src/WinGet.RestSource/Validators/StringValidators/LocaleValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/StringValidators/LocaleValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.StringValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.StringValidators { /// /// LocaleValidator. diff --git a/src/WinGet.RestSource/Validators/StringValidators/MSStoreProductIdentifierValidator.cs b/src/WinGet.RestSource.Utils/Validators/StringValidators/MSStoreProductIdentifierValidator.cs similarity index 90% rename from src/WinGet.RestSource/Validators/StringValidators/MSStoreProductIdentifierValidator.cs rename to src/WinGet.RestSource.Utils/Validators/StringValidators/MSStoreProductIdentifierValidator.cs index 167a36ea..79a273e0 100644 --- a/src/WinGet.RestSource/Validators/StringValidators/MSStoreProductIdentifierValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/StringValidators/MSStoreProductIdentifierValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.StringValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.StringValidators { /// /// MSStoreProductIdentifierValidator. diff --git a/src/WinGet.RestSource/Validators/StringValidators/MarketValidator.cs b/src/WinGet.RestSource.Utils/Validators/StringValidators/MarketValidator.cs similarity index 89% rename from src/WinGet.RestSource/Validators/StringValidators/MarketValidator.cs rename to src/WinGet.RestSource.Utils/Validators/StringValidators/MarketValidator.cs index ee428785..7c495623 100644 --- a/src/WinGet.RestSource/Validators/StringValidators/MarketValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/StringValidators/MarketValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.StringValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.StringValidators { /// /// MarketValidator. diff --git a/src/WinGet.RestSource/Validators/StringValidators/MinimumOSVersionValidator.cs b/src/WinGet.RestSource.Utils/Validators/StringValidators/MinimumOSVersionValidator.cs similarity index 91% rename from src/WinGet.RestSource/Validators/StringValidators/MinimumOSVersionValidator.cs rename to src/WinGet.RestSource.Utils/Validators/StringValidators/MinimumOSVersionValidator.cs index 255d1e9a..eaf2414d 100644 --- a/src/WinGet.RestSource/Validators/StringValidators/MinimumOSVersionValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/StringValidators/MinimumOSVersionValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.StringValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.StringValidators { /// /// MinimumOSVersionValidator. diff --git a/src/WinGet.RestSource/Validators/StringValidators/PackageFamilyNameValidator.cs b/src/WinGet.RestSource.Utils/Validators/StringValidators/PackageFamilyNameValidator.cs similarity index 90% rename from src/WinGet.RestSource/Validators/StringValidators/PackageFamilyNameValidator.cs rename to src/WinGet.RestSource.Utils/Validators/StringValidators/PackageFamilyNameValidator.cs index 7f120f54..54446ec9 100644 --- a/src/WinGet.RestSource/Validators/StringValidators/PackageFamilyNameValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/StringValidators/PackageFamilyNameValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.StringValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.StringValidators { /// /// PackageFamilyNameValidator. diff --git a/src/WinGet.RestSource/Validators/StringValidators/PackageIdentifierValidator.cs b/src/WinGet.RestSource.Utils/Validators/StringValidators/PackageIdentifierValidator.cs similarity index 90% rename from src/WinGet.RestSource/Validators/StringValidators/PackageIdentifierValidator.cs rename to src/WinGet.RestSource.Utils/Validators/StringValidators/PackageIdentifierValidator.cs index 74013a89..72f70bb5 100644 --- a/src/WinGet.RestSource/Validators/StringValidators/PackageIdentifierValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/StringValidators/PackageIdentifierValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.StringValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.StringValidators { /// /// PackageIdentifierValidator. diff --git a/src/WinGet.RestSource/Validators/StringValidators/PackageNameValidator.cs b/src/WinGet.RestSource.Utils/Validators/StringValidators/PackageNameValidator.cs similarity index 89% rename from src/WinGet.RestSource/Validators/StringValidators/PackageNameValidator.cs rename to src/WinGet.RestSource.Utils/Validators/StringValidators/PackageNameValidator.cs index 81af7112..476c9a3b 100644 --- a/src/WinGet.RestSource/Validators/StringValidators/PackageNameValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/StringValidators/PackageNameValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.StringValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.StringValidators { /// /// PackageNameValidator. diff --git a/src/WinGet.RestSource/Validators/StringValidators/PackageVersionValidator.cs b/src/WinGet.RestSource.Utils/Validators/StringValidators/PackageVersionValidator.cs similarity index 89% rename from src/WinGet.RestSource/Validators/StringValidators/PackageVersionValidator.cs rename to src/WinGet.RestSource.Utils/Validators/StringValidators/PackageVersionValidator.cs index 9e3758ff..9e607814 100644 --- a/src/WinGet.RestSource/Validators/StringValidators/PackageVersionValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/StringValidators/PackageVersionValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.StringValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.StringValidators { /// /// PackageVersionValidator. diff --git a/src/WinGet.RestSource/Validators/StringValidators/ProductCodeValidator.cs b/src/WinGet.RestSource.Utils/Validators/StringValidators/ProductCodeValidator.cs similarity index 89% rename from src/WinGet.RestSource/Validators/StringValidators/ProductCodeValidator.cs rename to src/WinGet.RestSource.Utils/Validators/StringValidators/ProductCodeValidator.cs index 43ffaf56..c5f1531b 100644 --- a/src/WinGet.RestSource/Validators/StringValidators/ProductCodeValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/StringValidators/ProductCodeValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.StringValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.StringValidators { /// /// ProductCodeValidator. diff --git a/src/WinGet.RestSource/Validators/StringValidators/ProtocolsValidator.cs b/src/WinGet.RestSource.Utils/Validators/StringValidators/ProtocolsValidator.cs similarity index 89% rename from src/WinGet.RestSource/Validators/StringValidators/ProtocolsValidator.cs rename to src/WinGet.RestSource.Utils/Validators/StringValidators/ProtocolsValidator.cs index 643daa5f..e2f6e3e4 100644 --- a/src/WinGet.RestSource/Validators/StringValidators/ProtocolsValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/StringValidators/ProtocolsValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.StringValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.StringValidators { /// /// ProtocolsValidator. diff --git a/src/WinGet.RestSource/Validators/StringValidators/PublisherValidator.cs b/src/WinGet.RestSource.Utils/Validators/StringValidators/PublisherValidator.cs similarity index 89% rename from src/WinGet.RestSource/Validators/StringValidators/PublisherValidator.cs rename to src/WinGet.RestSource.Utils/Validators/StringValidators/PublisherValidator.cs index d443944d..4d7069b9 100644 --- a/src/WinGet.RestSource/Validators/StringValidators/PublisherValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/StringValidators/PublisherValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.StringValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.StringValidators { /// /// PublisherValidator. diff --git a/src/WinGet.RestSource/Validators/StringValidators/ReleaseNotesValidator.cs b/src/WinGet.RestSource.Utils/Validators/StringValidators/ReleaseNotesValidator.cs similarity index 89% rename from src/WinGet.RestSource/Validators/StringValidators/ReleaseNotesValidator.cs rename to src/WinGet.RestSource.Utils/Validators/StringValidators/ReleaseNotesValidator.cs index 13388e8e..c2b92ad7 100644 --- a/src/WinGet.RestSource/Validators/StringValidators/ReleaseNotesValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/StringValidators/ReleaseNotesValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.StringValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.StringValidators { /// /// ReleaseNotesValidator. diff --git a/src/WinGet.RestSource/Validators/StringValidators/ShortDescriptionValidator.cs b/src/WinGet.RestSource.Utils/Validators/StringValidators/ShortDescriptionValidator.cs similarity index 89% rename from src/WinGet.RestSource/Validators/StringValidators/ShortDescriptionValidator.cs rename to src/WinGet.RestSource.Utils/Validators/StringValidators/ShortDescriptionValidator.cs index fcc67a29..33abff15 100644 --- a/src/WinGet.RestSource/Validators/StringValidators/ShortDescriptionValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/StringValidators/ShortDescriptionValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.StringValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.StringValidators { /// /// ShortDescriptionValidator. diff --git a/src/WinGet.RestSource/Validators/StringValidators/SignatureSha256Validator.cs b/src/WinGet.RestSource.Utils/Validators/StringValidators/SignatureSha256Validator.cs similarity index 89% rename from src/WinGet.RestSource/Validators/StringValidators/SignatureSha256Validator.cs rename to src/WinGet.RestSource.Utils/Validators/StringValidators/SignatureSha256Validator.cs index 5d79fadc..393e087f 100644 --- a/src/WinGet.RestSource/Validators/StringValidators/SignatureSha256Validator.cs +++ b/src/WinGet.RestSource.Utils/Validators/StringValidators/SignatureSha256Validator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.StringValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.StringValidators { /// /// SignatureSha256Validator. diff --git a/src/WinGet.RestSource/Validators/StringValidators/SourceIdentifierValidator.cs b/src/WinGet.RestSource.Utils/Validators/StringValidators/SourceIdentifierValidator.cs similarity index 89% rename from src/WinGet.RestSource/Validators/StringValidators/SourceIdentifierValidator.cs rename to src/WinGet.RestSource.Utils/Validators/StringValidators/SourceIdentifierValidator.cs index c6d4a9e4..6fccceef 100644 --- a/src/WinGet.RestSource/Validators/StringValidators/SourceIdentifierValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/StringValidators/SourceIdentifierValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.StringValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.StringValidators { /// /// SourceIdentifierValidator. diff --git a/src/WinGet.RestSource/Validators/StringValidators/SwitchValidator.cs b/src/WinGet.RestSource.Utils/Validators/StringValidators/SwitchValidator.cs similarity index 89% rename from src/WinGet.RestSource/Validators/StringValidators/SwitchValidator.cs rename to src/WinGet.RestSource.Utils/Validators/StringValidators/SwitchValidator.cs index 15b25dab..3c3c79dd 100644 --- a/src/WinGet.RestSource/Validators/StringValidators/SwitchValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/StringValidators/SwitchValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.StringValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.StringValidators { /// /// SwitchValidator. diff --git a/src/WinGet.RestSource/Validators/StringValidators/TagValidator.cs b/src/WinGet.RestSource.Utils/Validators/StringValidators/TagValidator.cs similarity index 89% rename from src/WinGet.RestSource/Validators/StringValidators/TagValidator.cs rename to src/WinGet.RestSource.Utils/Validators/StringValidators/TagValidator.cs index 790df2fc..1e0f26f3 100644 --- a/src/WinGet.RestSource/Validators/StringValidators/TagValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/StringValidators/TagValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.StringValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.StringValidators { /// /// TagValidator. diff --git a/src/WinGet.RestSource/Validators/StringValidators/UrlValidator.cs b/src/WinGet.RestSource.Utils/Validators/StringValidators/UrlValidator.cs similarity index 89% rename from src/WinGet.RestSource/Validators/StringValidators/UrlValidator.cs rename to src/WinGet.RestSource.Utils/Validators/StringValidators/UrlValidator.cs index c84fda89..4fcdcd91 100644 --- a/src/WinGet.RestSource/Validators/StringValidators/UrlValidator.cs +++ b/src/WinGet.RestSource.Utils/Validators/StringValidators/UrlValidator.cs @@ -4,7 +4,7 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Validators.StringValidators +namespace Microsoft.WinGet.RestSource.Utils.Validators.StringValidators { /// /// UrlValidator. diff --git a/src/WinGet.RestSource.Utils/WinGet.RestSource.Utils.csproj b/src/WinGet.RestSource.Utils/WinGet.RestSource.Utils.csproj new file mode 100644 index 00000000..c11e36fd --- /dev/null +++ b/src/WinGet.RestSource.Utils/WinGet.RestSource.Utils.csproj @@ -0,0 +1,50 @@ + + + + netstandard2.0 + Microsoft + Microsoft + Microsoft.WinGet.RestSource.Utils + Microsoft.WinGet.RestSource.Utils + + true + $(SolutionDir)documentation\Microsoft.WinGet.RestSource.Utils.xml + + + + 1701;1702;NU1701 + 8 + + + + DEBUG;TRACE + full + true + false + + + + pdbonly + true + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + diff --git a/src/WinGet.RestSource.sln b/src/WinGet.RestSource.sln index 4e3c7511..952563b9 100644 --- a/src/WinGet.RestSource.sln +++ b/src/WinGet.RestSource.sln @@ -13,7 +13,25 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution EndProject Project("{151D2E53-A2C4-4D7D-83FE-D05416EBD58E}") = "WinGet.RestSource.Infrastructure", "WinGet.RestSource.Infrastructure\WinGet.RestSource.Infrastructure.deployproj", "{0F98E939-EC64-40DA-9630-336A40807BBE}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinGet.RestSource.UnitTest", "WinGet.RestSource.UnitTest\WinGet.RestSource.UnitTest.csproj", "{3CD39A15-0E0E-4C71-AC8A-A2D3BF9D42AB}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WinGet.RestSource.UnitTest", "WinGet.RestSource.UnitTest\WinGet.RestSource.UnitTest.csproj", "{3CD39A15-0E0E-4C71-AC8A-A2D3BF9D42AB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WinGet.RestSource.PowershellSupport", "WinGet.RestSource.PowershellSupport\WinGet.RestSource.PowershellSupport.csproj", "{F2B5CF2A-9FC0-430D-A1BB-AC718E659DBF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WinGet.RestSource.Utils", "WinGet.RestSource.Utils\WinGet.RestSource.Utils.csproj", "{0BB2CC46-C7C4-4944-843E-ADBE14CEF29B}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Pipelines", "Pipelines", "{0D917189-B042-45F5-A5C3-F90C7B86B835}" + ProjectSection(SolutionItems) = preProject + ..\pipelines\winget-cli-restsource-ci.yml = ..\pipelines\winget-cli-restsource-ci.yml + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Templates", "Templates", "{ACFA9838-3FB2-4091-8BFF-BCB069D77A4D}" + ProjectSection(SolutionItems) = preProject + ..\pipelines\templates\copy-and-publish-powershell.yml = ..\pipelines\templates\copy-and-publish-powershell.yml + ..\pipelines\templates\copy-and-publish.yml = ..\pipelines\templates\copy-and-publish.yml + ..\pipelines\templates\package-and-publish.yml = ..\pipelines\templates\package-and-publish.yml + ..\pipelines\templates\restore-build-publish-test.yml = ..\pipelines\templates\restore-build-publish-test.yml + ..\pipelines\templates\run-unittests.yml = ..\pipelines\templates\run-unittests.yml + EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -37,10 +55,22 @@ Global {3CD39A15-0E0E-4C71-AC8A-A2D3BF9D42AB}.Debug|Any CPU.Build.0 = Debug|Any CPU {3CD39A15-0E0E-4C71-AC8A-A2D3BF9D42AB}.Release|Any CPU.ActiveCfg = Release|Any CPU {3CD39A15-0E0E-4C71-AC8A-A2D3BF9D42AB}.Release|Any CPU.Build.0 = Release|Any CPU + {F2B5CF2A-9FC0-430D-A1BB-AC718E659DBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F2B5CF2A-9FC0-430D-A1BB-AC718E659DBF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F2B5CF2A-9FC0-430D-A1BB-AC718E659DBF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F2B5CF2A-9FC0-430D-A1BB-AC718E659DBF}.Release|Any CPU.Build.0 = Release|Any CPU + {0BB2CC46-C7C4-4944-843E-ADBE14CEF29B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0BB2CC46-C7C4-4944-843E-ADBE14CEF29B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0BB2CC46-C7C4-4944-843E-ADBE14CEF29B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0BB2CC46-C7C4-4944-843E-ADBE14CEF29B}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {0D917189-B042-45F5-A5C3-F90C7B86B835} = {145CC9B9-A93E-46C1-90F7-DFB81233B39F} + {ACFA9838-3FB2-4091-8BFF-BCB069D77A4D} = {0D917189-B042-45F5-A5C3-F90C7B86B835} + EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {24BCF9E2-C2E3-48E9-90BD-E619553ABE3D} EndGlobalSection diff --git a/src/WinGet.RestSource/Cosmos/CosmosDataStore.cs b/src/WinGet.RestSource/Cosmos/CosmosDataStore.cs index f5a4b534..2c05d2df 100644 --- a/src/WinGet.RestSource/Cosmos/CosmosDataStore.cs +++ b/src/WinGet.RestSource/Cosmos/CosmosDataStore.cs @@ -16,16 +16,16 @@ namespace Microsoft.WinGet.RestSource.Cosmos using Microsoft.Azure.Cosmos; using Microsoft.Azure.Cosmos.Linq; using Microsoft.Extensions.Logging; - using Microsoft.WinGet.RestSource.Common; - using Microsoft.WinGet.RestSource.Constants; - using Microsoft.WinGet.RestSource.Constants.Enumerations; - using Microsoft.WinGet.RestSource.Exceptions; - using Microsoft.WinGet.RestSource.Models.Errors; - using Microsoft.WinGet.RestSource.Models.ExtendedSchemas; - using Microsoft.WinGet.RestSource.Models.Objects; - using Microsoft.WinGet.RestSource.Models.Schemas; - using Microsoft.WinGet.RestSource.Validators; - using Version = Microsoft.WinGet.RestSource.Models.Schemas.Version; + using Microsoft.WinGet.RestSource.Utils.Common; + using Microsoft.WinGet.RestSource.Utils.Constants; + using Microsoft.WinGet.RestSource.Utils.Constants.Enumerations; + using Microsoft.WinGet.RestSource.Utils.Exceptions; + using Microsoft.WinGet.RestSource.Utils.Models.Errors; + using Microsoft.WinGet.RestSource.Utils.Models.ExtendedSchemas; + using Microsoft.WinGet.RestSource.Utils.Models.Objects; + using Microsoft.WinGet.RestSource.Utils.Models.Schemas; + using Microsoft.WinGet.RestSource.Utils.Validators; + using Version = Microsoft.WinGet.RestSource.Utils.Models.Schemas.Version; /// /// Cosmos Data Store. @@ -505,7 +505,7 @@ public async Task> SearchPackageManifests(Ma else { // Process Inclusions - Models.Arrays.SearchRequestPackageMatchFilter inclusions = new Models.Arrays.SearchRequestPackageMatchFilter(); + Utils.Models.Arrays.SearchRequestPackageMatchFilter inclusions = new Utils.Models.Arrays.SearchRequestPackageMatchFilter(); if (manifestSearchRequest.Inclusions != null) { inclusions.AddRange(manifestSearchRequest.Inclusions); @@ -514,7 +514,7 @@ public async Task> SearchPackageManifests(Ma // Convert Query to inclusions to submit to cosmos if (manifestSearchRequest.Query != null) { - inclusions.AddRange(this.queryList.Select(q => new Models.Objects.SearchRequestPackageMatchFilter() + inclusions.AddRange(this.queryList.Select(q => new Utils.Models.Objects.SearchRequestPackageMatchFilter() { PackageMatchField = q, RequestMatch = manifestSearchRequest.Query, diff --git a/src/WinGet.RestSource/Cosmos/CosmosDatabase.cs b/src/WinGet.RestSource/Cosmos/CosmosDatabase.cs index 6acd5f55..0d8c529e 100644 --- a/src/WinGet.RestSource/Cosmos/CosmosDatabase.cs +++ b/src/WinGet.RestSource/Cosmos/CosmosDatabase.cs @@ -12,9 +12,9 @@ namespace Microsoft.WinGet.RestSource.Cosmos using Microsoft.Azure.Cosmos; using Microsoft.Azure.Cosmos.Linq; using Microsoft.Extensions.Logging; - using Microsoft.WinGet.RestSource.Common; - using Microsoft.WinGet.RestSource.Constants; - using Microsoft.WinGet.RestSource.Exceptions; + using Microsoft.WinGet.RestSource.Utils.Common; + using Microsoft.WinGet.RestSource.Utils.Constants; + using Microsoft.WinGet.RestSource.Utils.Exceptions; /// /// This class retrieves a database and sets it up if it does not exist. diff --git a/src/WinGet.RestSource/Models/ExtendedSchemas/CosmosPackageManifest.cs b/src/WinGet.RestSource/Cosmos/CosmosPackageManifest.cs similarity index 93% rename from src/WinGet.RestSource/Models/ExtendedSchemas/CosmosPackageManifest.cs rename to src/WinGet.RestSource/Cosmos/CosmosPackageManifest.cs index 7af96b35..e202a09e 100644 --- a/src/WinGet.RestSource/Models/ExtendedSchemas/CosmosPackageManifest.cs +++ b/src/WinGet.RestSource/Cosmos/CosmosPackageManifest.cs @@ -4,10 +4,10 @@ // // ----------------------------------------------------------------------- -namespace Microsoft.WinGet.RestSource.Models.ExtendedSchemas -{ - using Microsoft.WinGet.RestSource.Cosmos; - using Microsoft.WinGet.RestSource.Models.Schemas; +namespace Microsoft.WinGet.RestSource.Utils.Models.ExtendedSchemas +{ + using Microsoft.WinGet.RestSource.Cosmos; + using Microsoft.WinGet.RestSource.Utils.Models.Schemas; using Newtonsoft.Json; /// diff --git a/src/WinGet.RestSource/Cosmos/ICosmosDatabase.cs b/src/WinGet.RestSource/Cosmos/ICosmosDatabase.cs index 5d2df9ce..450144cf 100644 --- a/src/WinGet.RestSource/Cosmos/ICosmosDatabase.cs +++ b/src/WinGet.RestSource/Cosmos/ICosmosDatabase.cs @@ -9,7 +9,7 @@ namespace Microsoft.WinGet.RestSource.Cosmos using System.Linq; using System.Threading.Tasks; using Microsoft.Azure.Cosmos; - using Microsoft.WinGet.RestSource.Common; + using Microsoft.WinGet.RestSource.Utils.Common; /// /// This provides an interface for CosmosDatabase. diff --git a/src/WinGet.RestSource/Microsoft.WinGet.PowershellSupport.Documentation.xml b/src/WinGet.RestSource/Microsoft.WinGet.PowershellSupport.Documentation.xml new file mode 100644 index 00000000..e4d33873 --- /dev/null +++ b/src/WinGet.RestSource/Microsoft.WinGet.PowershellSupport.Documentation.xml @@ -0,0 +1,36 @@ + + + + Microsoft.WinGet.PowershellSupport + + + + + Wrapper class around PackageManifest object. + Supports converting yaml manifest to json object. + + + + + Merges a merged manifest object into an existing json representation of the app. + + Merged manifest object. + Prior json data to merge with. + A representing the rest source json representation of the package. + + + + Supports converting yaml manifest to json string. + Primarily supports powershell modules. + + + + + Processes a directory for yaml manifests and converts it into the rest json format. + + direcoty to process. Should contain the manifests for a single app. + Prior json data to merge with. + A string of the rest source json. + + + diff --git a/src/WinGet.RestSource/Models/ExtendedSchemas/CosmosSearch.cs b/src/WinGet.RestSource/Models/ExtendedSchemas/CosmosSearch.cs deleted file mode 100644 index c0b6f9f5..00000000 --- a/src/WinGet.RestSource/Models/ExtendedSchemas/CosmosSearch.cs +++ /dev/null @@ -1,64 +0,0 @@ -// ----------------------------------------------------------------------- -// -// Copyright (c) Microsoft Corporation. Licensed under the MIT License. -// -// ----------------------------------------------------------------------- - -namespace Microsoft.WinGet.RestSource.Models.ExtendedSchemas -{ - using System.Collections.Generic; - using Microsoft.WinGet.RestSource.Models.Schemas; - - /// - /// CosmosSearchResponse. - /// - public class CosmosSearch - { - /// - /// Initializes a new instance of the class. - /// CosmosSearch. - /// - public CosmosSearch() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// Package manifest. - public CosmosSearch(PackageManifest packageManifest) - { - this.PackageIdentifier = packageManifest.PackageIdentifier; - foreach (VersionExtended version in packageManifest.Versions) - { - this.Versions.Add(new SearchVersion { PackageVersion = version.PackageVersion, Channel = version.Channel }); - } - } - - /// - /// Gets or sets PackageIdentifier. - /// - public string PackageIdentifier { get; set; } - - /// - /// Gets or sets PackageIdentifier. - /// - public List Versions { get; set; } - - /// - /// Versions. - /// - public struct SearchVersion - { - /// - /// Gets or sets package Version. - /// - public string PackageVersion { get; set; } - - /// - /// Gets or sets channel. - /// - public string Channel { get; set; } - } - } -} diff --git a/src/WinGet.RestSource/WinGet.RestSource.csproj b/src/WinGet.RestSource/WinGet.RestSource.csproj index 695166b3..4c167d1d 100644 --- a/src/WinGet.RestSource/WinGet.RestSource.csproj +++ b/src/WinGet.RestSource/WinGet.RestSource.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 @@ -43,4 +43,8 @@ + + + + diff --git a/src/documentation/Microsoft.WinGet.RestSource.Util.xml b/src/documentation/Microsoft.WinGet.RestSource.Util.xml new file mode 100644 index 00000000..c0a42cd4 --- /dev/null +++ b/src/documentation/Microsoft.WinGet.RestSource.Util.xml @@ -0,0 +1,4301 @@ + + + + Microsoft.WinGet.RestSource.Util + + + + + This is a template continuation token for if a system token is not provided. + + + + + Initializes a new instance of the class. + + + + + Gets or sets MaxPageSize. + + + + + Gets or sets Index. + + + + + Gets or sets Data. + + + + + This represents a cosmos page. + It contains a list of elements, as well as associated data such as a continuation token. + + This is the element type for cosmos. + + + + Initializes a new instance of the class. + + + + + Gets or sets items. + + + + + Gets or sets continuation Token. + + + + + Class that contains JSON helpers for printing and exporting data. + + + + + Formats an object to a custom formatted JSON string. + + Type must be an object that can be serialized as JSON. + Generic object that can be serialized as JSON. + Formatting to use. + Null Handling Value. + Logger. + A formatted JSON String. + + + + Formats an object to an Indented JSON string. + + Type must be an object that can be serialized as JSON. + Generic object that can be serialized as JSON. + Logger. + A formatted JSON String. + + + + Formats an object to a non-formatted JSON string. + + Type must be an object that can be serialized as JSON. + Generic object that can be serialized as JSON. + Logger. + A formatted JSON String. + + + + Function to assist with processing Headers. + + + + + This function processes a set of headers to a standard dictionary. + It will throw an error if it detects an unsupported behavior. + + Dictionary. + Header Dictionary. + + + + This provides an interface for IApiDataStore. + + + + + This will add a package to the data store. + + Package. + Task. + + + + This will remove a package based on the packageIdentifier. + + Package Identifier. + Task. + + + + This will update a package based on the package identifier. + + Package Identifier. + Package. + Task. + + + + This will retrieve a set of packages based on a package identifier and a continuation token. + + Package Identifier. + Query Parameters. + CosmosPage of Package Manifests. + + + + This will add a version to a package based on the package identifier. + + Package Identifier. + Version. + Task. + + + + This will delete a version based on the package identifier and package version. + + Package Identifier. + Package Version. + Task. + + + + This updates a version associated with a package identifier and package version. + + Package Identifier. + Package Version. + Version. + Task. + + + + This will get a set of versions based on the package identifier, package version, and any continuation token. + + Package Identifier. + Package Version. + Query Parameters. + CosmosPage of Version. + + + + This will add an installer referencing a package identifier and a package version. + + Package Identifier. + Package Version. + Installer. + Task. + + + + This will delete an installer based on the package identifier, package version, and installer identifier. + + Package Identifier. + Package Version. + Installer Identifier. + Task. + + + + This updates an installer referencing a package identifier, package version, and an installer identifier. + + Package Identifier. + Package Version. + Installer Identifier. + Installer. + Task. + + + + This will get a set of Installers based on the package identifier, package version, installer identifier, and any continuation token. + + Package Identifier. + Package Version. + Installer Identifier. + Query Parameters. + CosmosPage of Installer. + + + + This will add a locale referencing a package identifier and a package version. + + Package Identifier. + Package Version. + Locale. + Task. + + + + This will delete a locale based on the package identifier, package version, and package locale. + + Package Identifier. + Package Version. + Package Locale. + Task. + + + + /// This updates a locale referencing a package identifier, package version, and an installer identifier. + + Package Identifier. + Package Version. + Package Locale. + Locale. + Task. + + + + This will get a set of Installers based on the package identifier, package version, installer identifier, and any continuation token. + + Package Identifier. + Package Version. + Package Locale. + Query Parameters. + CosmosPage of Locale. + + + + Add a Package Manifest. + + Package Manifest. + Task. + + + + Deletes a package manifest based on package identifier. + + Package Identifier. + Task. + + + + Update a package manifest based on package identifier. + + Package Identifier. + Package Manifest. + Task. + + + + Get a Package Manifest based on package identifier and query parameters. + + Package Identifier. + Query Parameters. + CosmosPage of Package Manifests. + + + + This will search for manifests based on a manifest search request and a set of query parameters. + + Manifest Search Request. + Header Parameters. + Query Parameters. + CosmosPage of ManifestSearchResponse. + + + + This class holds our common parsing functions. + + + + + This will convert a stream to an object. + + Stream. + Log Interface. + Object to return. + Object. + + + + This will convert a stream to an object. + + str. + Log Interface. + Object to return. + Object. + + + + String Encoder. + + + + + This will encode a string to Base 64. + + Plain Text. + Encoded data. + + + + This will decode data from Base 64. + + Encoded data. + Plain Text. + + + + Encodes a Continuation Token. + + Token. + Encoded Token. + + + + Decode a Continuation Token. + + Encoded Token. + Token. + + + + Unsupported and required fields helper. + + + + + Helper method to get the list of unsupported package match fields from search request. + + Manifest search request. + List of unsupported package match fields by server. + List of unsupported package match fields. + + + + Helper method to get the list of required package match fields from search request. + + Manifest search request. + List of required package match fields by server. + List of required package match fields. + + + + Helper method to get the list of unsupported query parameters from the request. + + Query parameters input. + List of unsupported query parameters by server. + List of unsupported query parameters. + + + + Helper method to get the list of required query parameters from the request. + + Query parameters input. + List of required query parameters by server. + List of required query parameters. + + + + API Constants. + + + + + Source Identifier. + + + + + Server Supported Versions. + + + + + Unsupported package match fields. + Note: NormalizedPackageNameAndPublisher field support is currently not implemented. + GitHub Issue: https://github.com/microsoft/winget-cli-restsource/issues/59. + + + + + Required package match fields. + + + + + Unsupported query parameters. + + + + + Required query paramters. + + + + + Gets server Identifier. + + + + + This contains the constants for connecting to Cosmos. + + + + + Cosmos Collection Name. + + + + + Cosmos Database Name setting. + + + + + This is the Cosmos Account Endpoint setting. + + + + + This is the Cosmos Account Key setting. + + + + + This is the maximum continuation token from cosmos db in kb. + + + + + Match Type Constants. + + + + + Exact. + + + + + CaseInsensitive. + + + + + StartsWith. + + + + + Substring. + + + + + Wildcard. + + + + + Fuzzy. + + + + + FuzzySubstring. + + + + + Package Match Field Constants. + + + + + PackageIdentifier. + + + + + PackageName. + + + + + Moniker. + + + + + Command. + + + + + Tag. + + + + + PackageFamilyName. + + + + + ProductCode. + + + + + NormalizedPackageNameAndPublisher. + + + + + Market. + + + + + This contains the constants for errors and error codes. + + + + + This is the code for an unhandled error. + + + + + This is the message for an unhandled error. + + + + + This is the code for when the resource version does not match the document version. + + + + + This is the message for when the resource version does not match the document version. + + + + + This is the code for an data validation error. + + + + + This is the message for an data validation error. + + + + + This is the code for when the object contains no versions. + + + + + This is the message for when the object contains no versions. + + + + + This is the code for when a version does not contain the selected package. + + + + + This is the message for when a version does not contain the selected package. + + + + + This is the code for when a Version already exists. + + + + + This is the message for when a Version already exists. + + + + + This is the code for when the resource version does not match the document version. + + + + + This is the message for when the resource version does not match the document version. + + + + + This is the code for when the object contains no versions. + + + + + This is the message for when the object contains no versions. + + + + + This is the code for when an installer does not contain the selected package. + + + + + This is the message for when an installer does not contain the selected package. + + + + + This is the code for when a Version already exists. + + + + + This is the message for when a Version already exists. + + + + + This is the code for when the installer version does not match the document installer. + + + + + This is the message for when the resource installer does not match the document installer. + + + + + This is the code for an Http Request Exception. + + + + + This is the message for an Http Request Exception. + + + + + This is the code for when the object contains no locales. + + + + + This is the message for when the object contains no locales. + + + + + This is the code for when a version does not contain the selected locale. + + + + + This is the message for when a version does not contain the selected locale. + + + + + This is the code for when a locale already exists. + + + + + This is the message for when a locales already exists. + + + + + This is the code for when the locale does not match the document locales. + + + + + This is the message for when the locale does not match the document locales. + + + + + This is the code for when the headers are not provided. + + + + + This is the message for when the headers are not provided. + + + + + This is the code for when an unsupported version is requested. + + + + + This is the message for when an unsupported version is requested. + + + + + This is the code for when to many continuation tokens are provided. + + + + + This is the message for when to many continuation tokens are provided. + + + + + This is the code for a resource Conflict. + + + + + This is the message for a resource Conflict. + + + + + This is the code for a resource not found. + + + + + This is the message for a resource not found. + + + + + This is the code for a failed precondition. + + + + + This is the message for a failed precondition. + + + + + This contains the constants for functions. + + + + + Function Post. + + + + + Function Delete. + + + + + Function Put. + + + + + Function Get. + + + + + Manifest Search Post Function Name. + + + + + Manifest Post Function Name. + + + + + Manifest Delete Function Name. + + + + + Manifest Put Function Name. + + + + + Manifest Get Function Name. + + + + + Package Post Function Name. + + + + + Package Delete Function Name. + + + + + Package Put Function Name. + + + + + Package Get Function Name. + + + + + Version Post Function Name. + + + + + Version Delete Function Name. + + + + + Version Put Function Name. + + + + + Version Get Function Name. + + + + + Installer Post Function Name. + + + + + Installer Delete Function Name. + + + + + Installer Put Function Name. + + + + + Installer Get Function Name. + + + + + Locale Post Function Name. + + + + + Locale Delete Function Name. + + + + + Locale Put Function Name. + + + + + Locale Get Function Name. + + + + + Information Get Function Name. + + + + + This contains constants for function settings. + + + + + Maximum results per page. + + + + + Header Constants. + + + + + Version Header. + + + + + Continuation Token. + + + + + Query Constants. + + + + + Query Version. + + + + + Query Channel. + + + + + Query Market. + + + + + Query Continuation Token. + + + + + This is for exceptions that occur with the Cosmos Database Client. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Internal Rest Error. + + + + Initializes a new instance of the class. + + Exception message. + + + + Initializes a new instance of the class. + + Exception message. + Internal Rest Error. + + + + Initializes a new instance of the class. + + Exception message. + Inner exception. + + + + Initializes a new instance of the class. + + Exception message. + Inner exception. + Internal Rest Error. + + + + Initializes a new instance of the class. + + Exception. + + + + Initializes a new instance of the class. + + Exception. + Internal Rest Error. + + + + This is the base exception for the WinGet.RestSource. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Internal Rest Error. + + + + Initializes a new instance of the class. + + Exception message. + + + + Initializes a new instance of the class. + + Exception message. + Internal Rest Error. + + + + Initializes a new instance of the class. + + Exception message. + Inner exception. + + + + Initializes a new instance of the class. + + Exception message. + Inner exception. + Internal Rest Error. + + + + Initializes a new instance of the class. + + Exception. + + + + Initializes a new instance of the class. + + Exception. + Internal Rest Error. + + + + Gets or sets internal error. + + + + + Process Document Client Exceptions. + + Document Client Exceptions. + Internal Rest Error. + + + + This is for exceptions that occur with the Cosmos Database Client. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Exception message. + + + + Initializes a new instance of the class. + + Internal Rest Error. + + + + Initializes a new instance of the class. + + Exception message. + Internal Rest Error. + + + + Initializes a new instance of the class. + + Exception message. + Inner exception. + + + + Initializes a new instance of the class. + + Exception message. + Inner exception. + Internal Rest Error. + + + + Initializes a new instance of the class. + + Exception. + + + + Initializes a new instance of the class. + + Exception. + Internal Rest Error. + + + + This will wrap API responses that need additional data. + + Response Type. + + + + Initializes a new instance of the class. + + Data. + Continuation Token. + + + + Gets or sets items. + + + + + Gets or sets continuation Token. + + + + + Agreements. + + + + + Initializes a new instance of the class. + + + + + ApiVersions. + + + + + Initializes a new instance of the class. + + + + + List of ARP entries. + + + + + Initializes a new instance of the class. + + + + + Capabilities. + + + + + Initializes a new instance of the class. + + + + + Commands. + + + + + Initializes a new instance of the class. + + + + + Dependencies. + + + + + Initializes a new instance of the class. + + + + + List of ExpectedReturnCode. + + + + + Initializes a new instance of the class. + + + + + + + + FileExtensions. + + + + + Initializes a new instance of the class. + + + + + InstallerSuccessCodes. + + + + + Maximum value of installer return code. + + + + + Minimum value of installer return code. + + + + + Initializes a new instance of the class. + + + + + + + + InstallModes. + + + + + Initializes a new instance of the class. + + + + + Markets. + + + + + Initializes a new instance of the class. + + + + + PackageDependency. + + + + + Initializes a new instance of the class. + + + + + PackageFamilyNames. + + + + + Initializes a new instance of the class. + + + + + PackageMatchFields. + + + + + Initializes a new instance of the class. + + + + + Platform. + + + + + Initializes a new instance of the class. + + + + + ProductCodes. + + + + + Initializes a new instance of the class. + + + + + Protocols. + + + + + Initializes a new instance of the class. + + + + + QueryParameters. + + + + + Initializes a new instance of the class. + + + + + RestrictedCapabilities. + + + + + Initializes a new instance of the class. + + + + + SearchRequestPackageMatchFilter. + + + + + Initializes a new instance of the class. + + + + + SearchVersions. + + + + + Initializes a new instance of the class. + + + + + Merge in a Search Version. + + Search Versions. + + + + Tags. + + + + + Initializes a new instance of the class. + + + + + UnsupportedOSArchitectures. + + + + + Initializes a new instance of the class. + + + + + API Array. + + IValidatableObject. + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Enumerable. + + + + Gets or sets APIArrayName. + + + + + Gets or sets a value indicating whether to AllowNull. + + + + + Gets or sets a value indicating whether to UniqueItems. + + + + + Gets or sets a value indicating whether to ValidateMembers. + + + + + Gets or sets MinItems. + + + + + Gets or sets MaxItems. + + + + + Gets or sets MaxItems. + + + + + Operator==. + + Left. + Right. + Bool. + + + + Operator!=. + + Left. + Right. + Bool. + + + + Make Distinct. + + + + + + + + Invalid comparison, present only to satisfy IEquality interface. + + Object to be compared to. + Will never return. + Will always throw. + + + + Compare this to another object which inherits List. + + List object to compare to. + True if lists contain same items in same order, false otherwise. + + + + + + + + + + API Data Interface. + + Type. + + + + API Data Interface. + + Type. + + + + Update Object. + + Object. + + + + This class represents an error response. When an error occurs, we will return this to the client. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Error Code. + Error Message. + Optional Exception. + + + + Gets or sets the integer error code for an error. + + + + + Gets or sets the error message for an error. + + + + + This is a manifest, which is an extension of the package core model, and the extended version model. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + manifest. + + + + Initializes a new instance of the class. + + manifest. + + + + Gets ID. + + + + + Converts to a Package Core. + + Package Core. + + + + CosmosSearchResponse. + + + + + Initializes a new instance of the class. + CosmosSearch. + + + + + Initializes a new instance of the class. + + Package manifest. + + + + Gets or sets PackageIdentifier. + + + + + Gets or sets PackageIdentifier. + + + + + Versions. + + + + + Gets or sets package Version. + + + + + Gets or sets channel. + + + + + This extends the core version model by nesting the installers model. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Version Core. + + + + Initializes a new instance of the class. + + Version Core. + + + + Gets or sets Installers. + + + + + Gets or sets Installers. + + + + + Operator==. + + Left. + Right. + Bool. + + + + Operator!=. + + Left. + Right. + Bool. + + + + This returns the Version representation of this object. + + Version Core Model. + + + + + + + Add an Installer. + + Installer to Add. + + + + Update Installer. + + Installer to Update. + + + + Remove Installer. + + Installer Identifier. + + + + Get Installer. + + Installer Identifier. + Installers. + + + + Add an Locale. + + Locale to Add. + + + + Update Locale. + + Locale to Update. + + + + Remove Locale. + + Installer Identifier. + + + + Get Installer. + + Package Locale. + Installers. + + + + + + + + + + + + + + + + VersionsExtended. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + enumerable. + + + + Add a version. + + Version to Add. + + + + Update a Version. + + The new Version. + + + + Remove an Installer. + + Installer Identifier to remove. + + + + Add a version. + + Version to Add. + + + + Update a Version. + + The new Version. + + + + Get Versions. + + Package Version. + VersionsExtended. + + + + Add Installer. + + Installer to Add. + Version to add to. + + + + Update an Installer in a Version Extended. + + Installer to Update. + Version to Update in. + + + + Remove an installer. + + Installer Identity to remove. + Version to remove from. + + + + Get Installer. + + Installer Identity to get. + Version to get from. + Installers. + + + + Add Locale. + + Locale to Add. + Version to add to. + + + + Update an Locale. + + Locale to Update. + Version to Update in. + + + + Remove an locale. + + Package Locale to remove. + Version to remove from. + + + + Get Locale. + + Package Locale to get. + Version to get from. + Installers. + + + + + + + Manifest Search Schema. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Manifest Search. + + + + Gets or sets continuation token. + + + + + Gets or sets maximum results. + + + + + Gets or sets a value indicating whether to fetch all manifests. + + + + + AppsAndFeatures. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + AppsAndFeatures. + + + + Gets or sets DisplayName. + + + + + Gets or sets Publisher. + + + + + Gets or sets DisplayVersion. + + + + + Gets or sets ProductCode. + + + + + Gets or sets UpgradeCode. + + + + + Gets or sets InstallerType. + + + + + Operator==. + + Left. + Right. + Bool. + + + + Operator!=. + + Left. + Right. + Bool. + + + + + + + + + + + + + + + + + + + Dependencies. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Dependencies. + + + + Gets or sets WindowsFeatures. + + + + + Gets or sets WindowsLibraries. + + + + + Gets or sets PackageDependencies. + + + + + Gets or sets ExternalDependencies. + + + + + Operator==. + + Left. + Right. + Bool. + + + + Operator!=. + + Left. + Right. + Bool. + + + + + + + + + + + + + + + + + + + ExpectedReturnCode. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Expected return code. + + + + Gets or sets InstallerReturnCode. + + + + + Gets or sets ReturnResponse. + + + + + Operator==. + + Left. + Right. + Bool. + + + + Operator!=. + + Left. + Right. + Bool. + + + + This updates the current expected return code to match another. + + Expected return code. + + + + + + + + + + + + + + + + InstallerSwitches. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + InstallerSwitches. + + + + Gets or sets Silent. + + + + + Gets or sets SilentWithProgress. + + + + + Gets or sets Interactive. + + + + + Gets or sets InstallLocation. + + + + + Gets or sets Log. + + + + + Gets or sets Upgrade. + + + + + Gets or sets Custom. + + + + + Operator==. + + Left. + Right. + Bool. + + + + Operator!=. + + Left. + Right. + Bool. + + + + + + + + + + + + + + + + + + + Markets. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Markets. + + + + Gets or sets AllowedMarkets. + + + + + Gets or sets ExcludedMarkets. + + + + + Operator==. + + Left. + Right. + Bool. + + + + Operator!=. + + Left. + Right. + Bool. + + + + + + + + + + + + + + + + + + + PackageDependency. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + PackageDependency. + + + + Gets or sets PackageIdentifier. + + + + + Gets or sets MinimumVersion. + + + + + Operator==. + + Left. + Right. + Bool. + + + + Operator!=. + + Left. + Right. + Bool. + + + + This updates the current package core to match another public core. + + Package Dependency. + + + + + + + + + + + + + + + + SearchRequestMatch. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + SearchRequestMatch. + + + + Gets or sets KeyWord. + + + + + Gets or sets MatchType. + + + + + Operator==. + + Left. + Right. + Bool. + + + + Operator!=. + + Left. + Right. + Bool. + + + + This updates the current package core to match another public core. + + Package Dependency. + + + + + + + + + + + + + + + + SearchRequestPackageMatchFilter. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + searchRequestPackageMatchFilter. + + + + Gets or sets PackageMatchField. + + + + + Gets or sets SearchRequestMatch. + + + + + Operator==. + + Left. + Right. + Bool. + + + + Operator!=. + + Left. + Right. + Bool. + + + + This updates the current package core to match another public core. + + Package Dependency. + + + + + + + + + + + + + + + + SearchVersion. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + SearchVersion. + + + + Gets or sets PackageVersion. + + + + + Gets or sets Channel. + + + + + Gets or sets PackageFamilyNames. + + + + + Gets or sets ProductCodes. + + + + + Operator==. + + Left. + Right. + Bool. + + + + Operator!=. + + Left. + Right. + Bool. + + + + + + + This Merges a search version if package version and channel match. + + Search Version. + + + + ConsolidationExpression Expression to be used for merging. + + Search Version. + Bool. + + + + + + + + + + + + + + + + SourceAgreement. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Agreement. + + + + Gets or sets AgreementLabel. + + + + + Gets or sets Agreement. + + + + + Gets or sets AgreementUrl. + + + + + Operator==. + + Left. + Right. + Bool. + + + + Operator!=. + + Left. + Right. + Bool. + + + + This updates the current package core to match another public core. + + Package Dependency. + + + + + + + + + + + + + + + + SourceAgreementExtended. + + + + + Initializes a new instance of the class. + + + + + Gets or sets AgreementsIdentifier. + + + + + Gets or sets Agreements. + + + + + Operator==. + + Left. + Right. + Bool. + + + + Operator!=. + + Left. + Right. + Bool. + + + + This updates the current agreement to match the other agreement. + + Package Dependency. + + + + + + + + + + + + + + + + Locale. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Locale. + + + + Gets or sets Moniker. + + + + + Operator==. + + Left. + Right. + Bool. + + + + Operator!=. + + Left. + Right. + Bool. + + + + + + + + + + + + + + + + + + + Server Information. + + + + + Initializes a new instance of the class. + + + + + Gets sourceIdentifier. + + + + + Gets serverSupportedVersions. + + + + + Gets SourceAgreements. + + + + + Gets UnsupportedPackageMatchFields. + + + + + Gets RequiredPackageMatchFields. + + + + + Gets UnsupportedQueryParameters. + + + + + Gets RequiredQueryParameters. + + + + + Installer. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Installer. + + + + Gets or sets InstallerIdentifier. + + + + + Gets or sets InstallerSha256. + + + + + Gets or sets InstallerUrl. + + + + + Gets or sets Architecture. + + + + + Gets or sets InstallerLocale. + + + + + Gets or sets Platform. + + + + + Gets or sets MinimumOsVersion. + + + + + Gets or sets InstallerType. + + + + + Gets or sets Scope. + + + + + Gets or sets SignatureSha256. + + + + + Gets or sets InstallModes. + + + + + Gets or sets InstallerSwitches. + + + + + Gets or sets InstallerSuccessCodes. + + + + + Gets or sets ExpectedReturnCodes. + + + + + Gets or sets UpgradeBehavior. + + + + + Gets or sets Commands. + + + + + Gets or sets Protocols. + + + + + Gets or sets FileExtensions. + + + + + Gets or sets Dependencies. + + + + + Gets or sets PackageFamilyName. + + + + + Gets or sets ProductCode. + + + + + Gets or sets Capabilities. + + + + + Gets or sets RestrictedCapabilities. + + + + + Gets or sets MSStoreProductIdentifier. + + + + + Gets or sets a value indicating whether InstallerAbortsTerminal is set. + This indicates if the package aborts the terminal during installation. + + + + + Gets or sets ReleaseDate. + + + + + Gets or sets a value indicating whether the installer requires an install location provided. + + + + + Gets or sets a value indicating whether the installer requires explicit upgrade. + + + + + Gets or sets the installer's elevation requirement. + + + + + Gets or sets UnsupportedOSArchitectures. + + + + + Gets or sets AppsAndFeaturesEntries. + + + + + Gets or sets Markets. + + + + + Operator==. + + Left. + Right. + Bool. + + + + Operator!=. + + Left. + Right. + Bool. + + + + + + + + + + + + + + + + + + + Installers. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Enumerable. + + + + Add new Installer. + + Installer to add. + + + + Update an Installer. + + New Installer. + + + + Remove an Installer. + + Installer Identifier to remove. + + + + Get Installers. + + Installer Identifier to get. + Installers. + + + + + + + Locale. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Locale. + + + + Gets or sets PackageLocale. + + + + + Gets or sets Publisher. + + + + + Gets or sets PublisherUrl. + + + + + Gets or sets PublisherSupportUrl. + + + + + Gets or sets PrivacyUrl. + + + + + Gets or sets Author. + + + + + Gets or sets PackageName. + + + + + Gets or sets PackageUrl. + + + + + Gets or sets License. + + + + + Gets or sets LicenseUrl. + + + + + Gets or sets Copyright. + + + + + Gets or sets CopyrightUrl. + + + + + Gets or sets ShortDescription. + + + + + Gets or sets Description. + + + + + Gets or sets ReleaseNotes. + + + + + Gets or sets ReleaseNotesUrl. + + + + + Gets or sets Agreements. + + + + + Gets or sets Tags. + + + + + Operator==. + + Left. + Right. + Bool. + + + + Operator!=. + + Left. + Right. + Bool. + + + + + + + + + + + + + + + + + + + Locales. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Enumerable. + + + + Add new Locale. + + Locale to add. + + + + Update an Locale. + + New Locale. + + + + Remove an Locale. + + Package Locale to remove. + + + + Get Installers. + + Package Locale to get. + Installers. + + + + + + + ManifestSearchRequest. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + ManifestSearchRequest. + + + + Gets or sets MaximumResults. + + + + + Gets or sets a value indicating whether to FetchAllManifests. + + + + + Gets or sets Query. + + + + + Gets or sets Query. + + + + + Gets or sets Query. + + + + + Operator==. + + Left. + Right. + Bool. + + + + Operator!=. + + Left. + Right. + Bool. + + + + + + + + + + + + + + + + + + + Manifest Search Response. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Package Identifier. + Package Name. + Publisher. + Search Versions. + + + + Initializes a new instance of the class. + + Package Identifier. + Package Name. + Publisher. + Search Version. + + + + Initializes a new instance of the class. + + Package Identifier. + + + + Initializes a new instance of the class. + + Package Identifier. + Package Name. + Publisher. + Package Version. + Channel. + Package Family Name. + Product Code. + + + + Gets or sets PackageIdentifier. + + + + + Gets or sets PackageName. + + + + + Gets or sets Publisher. + + + + + Gets or sets SearchVersions. + + + + + Operator==. + + Left. + Right. + Bool. + + + + Operator!=. + + Left. + Right. + Bool. + + + + This gets. + + Package Manifest. + Manifest Search Responses. + + + + Consolidates Manifest Search Responses. + + manifests. + Manifest Search Responses. + + + + + + + + + + + + + + + + + + + PackageCore. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + PackageCore. + + + + Gets or sets PackageIdentifier. + + + + + Operator==. + + Left. + Right. + Bool. + + + + Operator!=. + + Left. + Right. + Bool. + + + + + + + + + + + + + + + + + + + This is a manifest, which is an extension of the package core model, and the extended version model. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Package Core. + + + + Initializes a new instance of the class. + + Package Core. + + + + Gets or sets versions. + + + + + Converts to a Package Core. + + Package Core. + + + + This updates a Manifest to update match another Manifest. + + Manifest. + + + + Add Version. + + Version to add. + + + + Update a Version. + + Version to Update. + + + + Add Version. + + Version to add. + + + + Update a Version. + + Version to Update. + + + + Remove a Version. + + Version to Remove. + + + + Get Package Version. + + Package Version. + VersionsExtended. + + + + Add an Installer. + + Installer to Update. + Package Version to update in. + + + + Update an Installer. + + Installer to Update. + Package Version to update in. + + + + Remove an Installer. + + Installer to Update. + Package Version to update in. + + + + Get Installers. + + Installer to Get. + Package Version to get in. + Installers. + + + + Add an Locale. + + Installer to Update. + Package Version to update in. + + + + Update a Locale. + + Locale to Update. + Package Version to update in. + + + + Remove an Locale. + + Locale to Update. + Package Version to update in. + + + + Get Locale. + + Locale to Get. + Package Version to get in. + Locales. + + + + + + + + + + This is the core version model. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Version Core Model. + + + + Gets or sets PackageVersion. + + + + + Gets or sets Channel. + + + + + Gets or sets DefaultLocale. + + + + + Operator==. + + Left. + Right. + Bool. + + + + Operator!=. + + Left. + Right. + Bool. + + + + + + + + + + + + + + + + + + + Versions. + + + + + Initializes a new instance of the class. + + + + + This class holds our common validation process. + + + + + Performs Common Validation Process. + + Validatable Object. + Validatable Type. + + + + Performs Common Validation Process. + + Validatable Object. + Validation Results. + Validatable Type. + bool. + + + + Asserts an object is not null, and throws a validation error if it is. + + Object to Test. + Type of Object. + + + + Asserts a string is not null, and throws a validation error if it is. + + String to Test. + + + + ApiDateTimeValidator. + + + + + Initializes a new instance of the class. + + + + + Gets or sets a value indicating whether to Allow Null. + + + + + Public Facing Validation. + + Object to validate. + Validation Context. + Validation Result. + + + + Verifies if an object is a valid API DateTime based on the parameters. + + Object to validate. + Validation Context. + Validation Result. + + + + ReleaseDateValidator. + + + + + Initializes a new instance of the class. + + + + + ApiEnumValidator. + + + + + Initializes a new instance of the class. + + + + + Gets or sets Values. + + + + + Gets or sets StringComparer. + + + + + Gets or sets a value indicating whether to Allow Null. + + + + + Public Facing Validation. + + Object to validate. + Validation Context. + Validation Result. + + + + Verifies if an object is a valid API string based on the parameters. + + Object to validate. + Validation Context. + Validation Result. + + + + Architecture. + + + + + Initializes a new instance of the class. + + + + + ElevationRequirementValidator. + + + + + Initializes a new instance of the class. + + + + + Expected Return Code Response. + + + + + Initializes a new instance of the class. + + + + + InstallerTypeValidator. + + + + + Initializes a new instance of the class. + + + + + InstallModeValidator. + + + + + Initializes a new instance of the class. + + + + + MatchTypeValidatorSchema. + + + + + Initializes a new instance of the class. + + + + + PackageMatchFieldValidator. + + + + + Initializes a new instance of the class. + + + + + PlatformValidatorEnum. + + + + + Initializes a new instance of the class. + + + + + ScopeValidator. + + + + + Initializes a new instance of the class. + + + + + UnsupportedOSArchitecturesValidator. + + + + + Initializes a new instance of the class. + + + + + UpgradeBehaviorValidator. + + + + + Initializes a new instance of the class. + + + + + AgreementLabelValidator. + + + + + Initializes a new instance of the class. + + + + + AgreementIdentifierValidator. + + + + + Initializes a new instance of the class. + + + + + AgreementValidator. + + + + + Initializes a new instance of the class. + + + + + Base String Validation Attribute. + + + + + Initializes a new instance of the class. + + + + + Gets or sets a value indicating whether to Allow Null. + + + + + Gets or sets MatchPattern. + + + + + Gets or sets MinLength. + + + + + Gets or sets MaxLength. + + + + + Public Facing Validation. + + Object to validate. + Validation Context. + Validation Result. + + + + Verifies if an object is a valid API string based on the parameters. + + Object to validate. + Validation Context. + Validation Result. + + + + ApiVersionValidator. + + + + + Initializes a new instance of the class. + + + + + AuthorValidator. + + + + + Initializes a new instance of the class. + + + + + CapabilitiesValidator. + + + + + Initializes a new instance of the class. + + + + + ChannelValidator. + + + + + Initializes a new instance of the class. + + + + + CommandsValidator. + + + + + Initializes a new instance of the class. + + + + + ContinuationTokenValidator. + + + + + Initializes a new instance of the class. + + + + + CopyrightValidator. + + + + + Initializes a new instance of the class. + + + + + CustomSwitchValidator. + + + + + Initializes a new instance of the class. + + + + + Dependencies. + + + + + Initializes a new instance of the class. + + + + + DescriptionValidator. + + + + + Initializes a new instance of the class. + + + + + DisplayAndPublisherNameValidator. + + + + + Initializes a new instance of the class. + + + + + DisplayVersionValidator. + + + + + Initializes a new instance of the class. + + + + + FileExtensionsValidator. + + + + + Initializes a new instance of the class. + + + + + IApiStringValidator. + + + + + ValidateApiString. + + Value. + Validation Context. + ValidationResult. + + + + InstallerIdentifierValidatorValidator. + + + + + Initializes a new instance of the class. + + + + + InstallerSha256. + + + + + Initializes a new instance of the class. + + + + + KeyWordValidator. + + + + + Initializes a new instance of the class. + + + + + LicenseValidator. + + + + + Initializes a new instance of the class. + + + + + LocaleValidator. + + + + + Initializes a new instance of the class. + + + + + MarketValidator. + + + + + Initializes a new instance of the class. + + + + + MinimumOSVersionValidator. + + + + + Initializes a new instance of the class. + + + + + MSStoreProductIdentifierValidator. + + + + + Initializes a new instance of the class. + + + + + PackageFamilyNameValidator. + + + + + Initializes a new instance of the class. + + + + + PackageIdentifierValidator. + + + + + Initializes a new instance of the class. + + + + + PackageNameValidator. + + + + + Initializes a new instance of the class. + + + + + PackageVersionValidator. + + + + + Initializes a new instance of the class. + + + + + ProductCodeValidator. + + + + + Initializes a new instance of the class. + + + + + ProtocolsValidator. + + + + + Initializes a new instance of the class. + + + + + PublisherValidator. + + + + + Initializes a new instance of the class. + + + + + ReleaseNotesValidator. + + + + + Initializes a new instance of the class. + + + + + ShortDescriptionValidator. + + + + + Initializes a new instance of the class. + + + + + SignatureSha256Validator. + + + + + Initializes a new instance of the class. + + + + + SourceIdentifierValidator. + + + + + Initializes a new instance of the class. + + + + + SwitchValidator. + + + + + Initializes a new instance of the class. + + + + + TagValidator. + + + + + Initializes a new instance of the class. + + + + + UrlValidator. + + + + + Initializes a new instance of the class. + + + + + This will wrap API responses that need additional data. + + Response Type. + + + + Initializes a new instance of the class. + + Data. + Continuation Token. + + + + Gets or sets UnsupportedQueryParameters. + + + + + Gets or sets RequiredQueryParameters. + + + + + This will wrap API responses that need additional data. + + Response Type. + + + + Initializes a new instance of the class. + + Data. + Continuation Token. + + + + Gets or sets UnsupportedPackageMatchFields. + + + + + Gets or sets RequiredPackageMatchFields. + + + + diff --git a/src/documentation/Microsoft.WinGet.RestSource.Utils.xml b/src/documentation/Microsoft.WinGet.RestSource.Utils.xml new file mode 100644 index 00000000..77fcff8d --- /dev/null +++ b/src/documentation/Microsoft.WinGet.RestSource.Utils.xml @@ -0,0 +1,4231 @@ + + + + Microsoft.WinGet.RestSource.Utils + + + + + This is a template continuation token for if a system token is not provided. + + + + + Initializes a new instance of the class. + + + + + Gets or sets MaxPageSize. + + + + + Gets or sets Index. + + + + + Gets or sets Data. + + + + + This represents a cosmos page. + It contains a list of elements, as well as associated data such as a continuation token. + + This is the element type for cosmos. + + + + Initializes a new instance of the class. + + + + + Gets or sets items. + + + + + Gets or sets continuation Token. + + + + + Class that contains JSON helpers for printing and exporting data. + + + + + Formats an object to a custom formatted JSON string. + + Type must be an object that can be serialized as JSON. + Generic object that can be serialized as JSON. + Formatting to use. + Null Handling Value. + Logger. + A formatted JSON String. + + + + Formats an object to an Indented JSON string. + + Type must be an object that can be serialized as JSON. + Generic object that can be serialized as JSON. + Logger. + A formatted JSON String. + + + + Formats an object to a non-formatted JSON string. + + Type must be an object that can be serialized as JSON. + Generic object that can be serialized as JSON. + Logger. + A formatted JSON String. + + + + Function to assist with processing Headers. + + + + + This function processes a set of headers to a standard dictionary. + It will throw an error if it detects an unsupported behavior. + + Dictionary. + Header Dictionary. + + + + This provides an interface for IApiDataStore. + + + + + This will add a package to the data store. + + Package. + Task. + + + + This will remove a package based on the packageIdentifier. + + Package Identifier. + Task. + + + + This will update a package based on the package identifier. + + Package Identifier. + Package. + Task. + + + + This will retrieve a set of packages based on a package identifier and a continuation token. + + Package Identifier. + Query Parameters. + CosmosPage of Package Manifests. + + + + This will add a version to a package based on the package identifier. + + Package Identifier. + Version. + Task. + + + + This will delete a version based on the package identifier and package version. + + Package Identifier. + Package Version. + Task. + + + + This updates a version associated with a package identifier and package version. + + Package Identifier. + Package Version. + Version. + Task. + + + + This will get a set of versions based on the package identifier, package version, and any continuation token. + + Package Identifier. + Package Version. + Query Parameters. + CosmosPage of Version. + + + + This will add an installer referencing a package identifier and a package version. + + Package Identifier. + Package Version. + Installer. + Task. + + + + This will delete an installer based on the package identifier, package version, and installer identifier. + + Package Identifier. + Package Version. + Installer Identifier. + Task. + + + + This updates an installer referencing a package identifier, package version, and an installer identifier. + + Package Identifier. + Package Version. + Installer Identifier. + Installer. + Task. + + + + This will get a set of Installers based on the package identifier, package version, installer identifier, and any continuation token. + + Package Identifier. + Package Version. + Installer Identifier. + Query Parameters. + CosmosPage of Installer. + + + + This will add a locale referencing a package identifier and a package version. + + Package Identifier. + Package Version. + Locale. + Task. + + + + This will delete a locale based on the package identifier, package version, and package locale. + + Package Identifier. + Package Version. + Package Locale. + Task. + + + + /// This updates a locale referencing a package identifier, package version, and an installer identifier. + + Package Identifier. + Package Version. + Package Locale. + Locale. + Task. + + + + This will get a set of Installers based on the package identifier, package version, installer identifier, and any continuation token. + + Package Identifier. + Package Version. + Package Locale. + Query Parameters. + CosmosPage of Locale. + + + + Add a Package Manifest. + + Package Manifest. + Task. + + + + Deletes a package manifest based on package identifier. + + Package Identifier. + Task. + + + + Update a package manifest based on package identifier. + + Package Identifier. + Package Manifest. + Task. + + + + Get a Package Manifest based on package identifier and query parameters. + + Package Identifier. + Query Parameters. + CosmosPage of Package Manifests. + + + + This will search for manifests based on a manifest search request and a set of query parameters. + + Manifest Search Request. + Header Parameters. + Query Parameters. + CosmosPage of ManifestSearchResponse. + + + + This class holds our common parsing functions. + + + + + This will convert a stream to an object. + + Stream. + Log Interface. + Object to return. + Object. + + + + This will convert a stream to an object. + + str. + Log Interface. + Object to return. + Object. + + + + String Encoder. + + + + + This will encode a string to Base 64. + + Plain Text. + Encoded data. + + + + This will decode data from Base 64. + + Encoded data. + Plain Text. + + + + Encodes a Continuation Token. + + Token. + Encoded Token. + + + + Decode a Continuation Token. + + Encoded Token. + Token. + + + + Unsupported and required fields helper. + + + + + Helper method to get the list of unsupported package match fields from search request. + + Manifest search request. + List of unsupported package match fields by server. + List of unsupported package match fields. + + + + Helper method to get the list of required package match fields from search request. + + Manifest search request. + List of required package match fields by server. + List of required package match fields. + + + + Helper method to get the list of unsupported query parameters from the request. + + Query parameters input. + List of unsupported query parameters by server. + List of unsupported query parameters. + + + + Helper method to get the list of required query parameters from the request. + + Query parameters input. + List of required query parameters by server. + List of required query parameters. + + + + This will wrap API responses that need additional data. + + Response Type. + + + + Initializes a new instance of the class. + + Data. + Continuation Token. + + + + Gets or sets UnsupportedQueryParameters. + + + + + Gets or sets RequiredQueryParameters. + + + + + This will wrap API responses that need additional data. + + Response Type. + + + + Initializes a new instance of the class. + + Data. + Continuation Token. + + + + Gets or sets UnsupportedPackageMatchFields. + + + + + Gets or sets RequiredPackageMatchFields. + + + + + API Constants. + + + + + Source Identifier. + + + + + Server Supported Versions. + + + + + Unsupported package match fields. + Note: NormalizedPackageNameAndPublisher field support is currently not implemented. + GitHub Issue: https://github.com/microsoft/winget-cli-restsource/issues/59. + + + + + Required package match fields. + + + + + Unsupported query parameters. + + + + + Required query paramters. + + + + + Gets server Identifier. + + + + + This contains the constants for connecting to Cosmos. + + + + + Cosmos Container Name. + + + + + Cosmos Database Name setting. + + + + + This is the Cosmos Account Endpoint setting. + + + + + This is the Cosmos read-write key setting. + + + + + This is the Cosmos read-only key setting. + + + + + This is the maximum continuation token from cosmos db in kb. + + + + + Match Type Constants. + + + + + Exact. + + + + + CaseInsensitive. + + + + + StartsWith. + + + + + Substring. + + + + + Wildcard. + + + + + Fuzzy. + + + + + FuzzySubstring. + + + + + Package Match Field Constants. + + + + + PackageIdentifier. + + + + + PackageName. + + + + + Moniker. + + + + + Command. + + + + + Tag. + + + + + PackageFamilyName. + + + + + ProductCode. + + + + + NormalizedPackageNameAndPublisher. + + + + + Market. + + + + + This contains the constants for errors and error codes. + + + + + This is the code for an unhandled error. + + + + + This is the message for an unhandled error. + + + + + This is the code for when the resource version does not match the document version. + + + + + This is the message for when the resource version does not match the document version. + + + + + This is the code for an data validation error. + + + + + This is the message for an data validation error. + + + + + This is the code for when the object contains no versions. + + + + + This is the message for when the object contains no versions. + + + + + This is the code for when a version does not contain the selected package. + + + + + This is the message for when a version does not contain the selected package. + + + + + This is the code for when a Version already exists. + + + + + This is the message for when a Version already exists. + + + + + This is the code for when the resource version does not match the document version. + + + + + This is the message for when the resource version does not match the document version. + + + + + This is the code for when the object contains no versions. + + + + + This is the message for when the object contains no versions. + + + + + This is the code for when an installer does not contain the selected package. + + + + + This is the message for when an installer does not contain the selected package. + + + + + This is the code for when a Version already exists. + + + + + This is the message for when a Version already exists. + + + + + This is the code for when the installer version does not match the document installer. + + + + + This is the message for when the resource installer does not match the document installer. + + + + + This is the code for an Http Request Exception. + + + + + This is the message for an Http Request Exception. + + + + + This is the code for when the object contains no locales. + + + + + This is the message for when the object contains no locales. + + + + + This is the code for when a version does not contain the selected locale. + + + + + This is the message for when a version does not contain the selected locale. + + + + + This is the code for when a locale already exists. + + + + + This is the message for when a locales already exists. + + + + + This is the code for when the locale does not match the document locales. + + + + + This is the message for when the locale does not match the document locales. + + + + + This is the code for when the headers are not provided. + + + + + This is the message for when the headers are not provided. + + + + + This is the code for when an unsupported version is requested. + + + + + This is the message for when an unsupported version is requested. + + + + + This is the code for when to many continuation tokens are provided. + + + + + This is the message for when to many continuation tokens are provided. + + + + + This is the code for a resource Conflict. + + + + + This is the message for a resource Conflict. + + + + + This is the code for a resource not found. + + + + + This is the message for a resource not found. + + + + + This is the code for a failed precondition. + + + + + This is the message for a failed precondition. + + + + + This contains the constants for functions. + + + + + Function Post. + + + + + Function Delete. + + + + + Function Put. + + + + + Function Get. + + + + + Manifest Search Post Function Name. + + + + + Manifest Post Function Name. + + + + + Manifest Delete Function Name. + + + + + Manifest Put Function Name. + + + + + Manifest Get Function Name. + + + + + Package Post Function Name. + + + + + Package Delete Function Name. + + + + + Package Put Function Name. + + + + + Package Get Function Name. + + + + + Version Post Function Name. + + + + + Version Delete Function Name. + + + + + Version Put Function Name. + + + + + Version Get Function Name. + + + + + Installer Post Function Name. + + + + + Installer Delete Function Name. + + + + + Installer Put Function Name. + + + + + Installer Get Function Name. + + + + + Locale Post Function Name. + + + + + Locale Delete Function Name. + + + + + Locale Put Function Name. + + + + + Locale Get Function Name. + + + + + Information Get Function Name. + + + + + This contains constants for function settings. + + + + + Maximum results per page. + + + + + Header Constants. + + + + + Version Header. + + + + + Continuation Token. + + + + + Query Constants. + + + + + Query Version. + + + + + Query Channel. + + + + + Query Market. + + + + + Query Continuation Token. + + + + + This is for exceptions that occur with the Cosmos Database Client. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Internal Rest Error. + + + + Initializes a new instance of the class. + + Exception message. + + + + Initializes a new instance of the class. + + Exception message. + Internal Rest Error. + + + + Initializes a new instance of the class. + + Exception message. + Inner exception. + + + + Initializes a new instance of the class. + + Exception message. + Inner exception. + Internal Rest Error. + + + + Initializes a new instance of the class. + + Exception. + + + + Initializes a new instance of the class. + + Exception. + Internal Rest Error. + + + + This is the base exception for the WinGet.RestSource. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Internal Rest Error. + + + + Initializes a new instance of the class. + + Exception message. + + + + Initializes a new instance of the class. + + Exception message. + Internal Rest Error. + + + + Initializes a new instance of the class. + + Exception message. + Inner exception. + + + + Initializes a new instance of the class. + + Exception message. + Inner exception. + Internal Rest Error. + + + + Initializes a new instance of the class. + + Exception. + + + + Initializes a new instance of the class. + + Exception. + Internal Rest Error. + + + + Gets or sets internal error. + + + + + Process Cosmos Exceptions. + + Cosmos Exception. + Internal Rest Error. + + + + This is for exceptions that occur with the Cosmos Database Client. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Exception message. + + + + Initializes a new instance of the class. + + Internal Rest Error. + + + + Initializes a new instance of the class. + + Exception message. + Internal Rest Error. + + + + Initializes a new instance of the class. + + Exception message. + Inner exception. + + + + Initializes a new instance of the class. + + Exception message. + Inner exception. + Internal Rest Error. + + + + Initializes a new instance of the class. + + Exception. + + + + Initializes a new instance of the class. + + Exception. + Internal Rest Error. + + + + This will wrap API responses that need additional data. + + Response Type. + + + + Initializes a new instance of the class. + + Data. + Continuation Token. + + + + Gets or sets items. + + + + + Gets or sets continuation Token. + + + + + Agreements. + + + + + Initializes a new instance of the class. + + + + + ApiVersions. + + + + + Initializes a new instance of the class. + + + + + List of ARP entries. + + + + + Initializes a new instance of the class. + + + + + Capabilities. + + + + + Initializes a new instance of the class. + + + + + Commands. + + + + + Initializes a new instance of the class. + + + + + Dependencies. + + + + + Initializes a new instance of the class. + + + + + List of ExpectedReturnCode. + + + + + Initializes a new instance of the class. + + + + + + + + FileExtensions. + + + + + Initializes a new instance of the class. + + + + + InstallerSuccessCodes. + + + + + Maximum value of installer return code. + + + + + Minimum value of installer return code. + + + + + Initializes a new instance of the class. + + + + + + + + InstallModes. + + + + + Initializes a new instance of the class. + + + + + Markets. + + + + + Initializes a new instance of the class. + + + + + PackageDependency. + + + + + Initializes a new instance of the class. + + + + + PackageFamilyNames. + + + + + Initializes a new instance of the class. + + + + + PackageMatchFields. + + + + + Initializes a new instance of the class. + + + + + Platform. + + + + + Initializes a new instance of the class. + + + + + ProductCodes. + + + + + Initializes a new instance of the class. + + + + + Protocols. + + + + + Initializes a new instance of the class. + + + + + QueryParameters. + + + + + Initializes a new instance of the class. + + + + + RestrictedCapabilities. + + + + + Initializes a new instance of the class. + + + + + SearchRequestPackageMatchFilter. + + + + + Initializes a new instance of the class. + + + + + SearchVersions. + + + + + Initializes a new instance of the class. + + + + + Merge in a Search Version. + + Search Versions. + + + + Tags. + + + + + Initializes a new instance of the class. + + + + + UnsupportedOSArchitectures. + + + + + Initializes a new instance of the class. + + + + + API Array. + + IValidatableObject. + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Enumerable. + + + + Gets or sets APIArrayName. + + + + + Gets or sets a value indicating whether to AllowNull. + + + + + Gets or sets a value indicating whether to UniqueItems. + + + + + Gets or sets a value indicating whether to ValidateMembers. + + + + + Gets or sets MinItems. + + + + + Gets or sets MaxItems. + + + + + Gets or sets MaxItems. + + + + + Operator==. + + Left. + Right. + Bool. + + + + Operator!=. + + Left. + Right. + Bool. + + + + Make Distinct. + + + + + + + + Invalid comparison, present only to satisfy IEquality interface. + + Object to be compared to. + Will never return. + Will always throw. + + + + Compare this to another object which inherits List. + + List object to compare to. + True if lists contain same items in same order, false otherwise. + + + + + + + + + + API Data Interface. + + Type. + + + + API Data Interface. + + Type. + + + + Update Object. + + Object. + + + + This class represents an error response. When an error occurs, we will return this to the client. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Error Code. + Error Message. + Optional Exception. + + + + Gets or sets the integer error code for an error. + + + + + Gets or sets the error message for an error. + + + + + This extends the core version model by nesting the installers model. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Version Core. + + + + Initializes a new instance of the class. + + Version Core. + + + + Gets or sets Installers. + + + + + Gets or sets Installers. + + + + + Operator==. + + Left. + Right. + Bool. + + + + Operator!=. + + Left. + Right. + Bool. + + + + This returns the Version representation of this object. + + Version Core Model. + + + + + + + Add an Installer. + + Installer to Add. + + + + Update Installer. + + Installer to Update. + + + + Remove Installer. + + Installer Identifier. + + + + Get Installer. + + Installer Identifier. + Installers. + + + + Add an Locale. + + Locale to Add. + + + + Update Locale. + + Locale to Update. + + + + Remove Locale. + + Installer Identifier. + + + + Get Installer. + + Package Locale. + Installers. + + + + + + + + + + + + + + + + VersionsExtended. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + enumerable. + + + + Add a version. + + Version to Add. + + + + Update a Version. + + The new Version. + + + + Remove an Installer. + + Installer Identifier to remove. + + + + Add a version. + + Version to Add. + + + + Update a Version. + + The new Version. + + + + Get Versions. + + Package Version. + VersionsExtended. + + + + Add Installer. + + Installer to Add. + Version to add to. + + + + Update an Installer in a Version Extended. + + Installer to Update. + Version to Update in. + + + + Remove an installer. + + Installer Identity to remove. + Version to remove from. + + + + Get Installer. + + Installer Identity to get. + Version to get from. + Installers. + + + + Add Locale. + + Locale to Add. + Version to add to. + + + + Update an Locale. + + Locale to Update. + Version to Update in. + + + + Remove an locale. + + Package Locale to remove. + Version to remove from. + + + + Get Locale. + + Package Locale to get. + Version to get from. + Installers. + + + + + + + Manifest Search Schema. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Manifest Search. + + + + Gets or sets continuation token. + + + + + Gets or sets maximum results. + + + + + Gets or sets a value indicating whether to fetch all manifests. + + + + + AppsAndFeatures. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + AppsAndFeatures. + + + + Gets or sets DisplayName. + + + + + Gets or sets Publisher. + + + + + Gets or sets DisplayVersion. + + + + + Gets or sets ProductCode. + + + + + Gets or sets UpgradeCode. + + + + + Gets or sets InstallerType. + + + + + Operator==. + + Left. + Right. + Bool. + + + + Operator!=. + + Left. + Right. + Bool. + + + + + + + + + + + + + + + + + + + Dependencies. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Dependencies. + + + + Gets or sets WindowsFeatures. + + + + + Gets or sets WindowsLibraries. + + + + + Gets or sets PackageDependencies. + + + + + Gets or sets ExternalDependencies. + + + + + Operator==. + + Left. + Right. + Bool. + + + + Operator!=. + + Left. + Right. + Bool. + + + + + + + + + + + + + + + + + + + ExpectedReturnCode. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Expected return code. + + + + Gets or sets InstallerReturnCode. + + + + + Gets or sets ReturnResponse. + + + + + Operator==. + + Left. + Right. + Bool. + + + + Operator!=. + + Left. + Right. + Bool. + + + + This updates the current expected return code to match another. + + Expected return code. + + + + + + + + + + + + + + + + InstallerSwitches. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + InstallerSwitches. + + + + Gets or sets Silent. + + + + + Gets or sets SilentWithProgress. + + + + + Gets or sets Interactive. + + + + + Gets or sets InstallLocation. + + + + + Gets or sets Log. + + + + + Gets or sets Upgrade. + + + + + Gets or sets Custom. + + + + + Operator==. + + Left. + Right. + Bool. + + + + Operator!=. + + Left. + Right. + Bool. + + + + + + + + + + + + + + + + + + + Markets. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Markets. + + + + Gets or sets AllowedMarkets. + + + + + Gets or sets ExcludedMarkets. + + + + + Operator==. + + Left. + Right. + Bool. + + + + Operator!=. + + Left. + Right. + Bool. + + + + + + + + + + + + + + + + + + + PackageDependency. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + PackageDependency. + + + + Gets or sets PackageIdentifier. + + + + + Gets or sets MinimumVersion. + + + + + Operator==. + + Left. + Right. + Bool. + + + + Operator!=. + + Left. + Right. + Bool. + + + + This updates the current package core to match another public core. + + Package Dependency. + + + + + + + + + + + + + + + + SearchRequestMatch. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + SearchRequestMatch. + + + + Gets or sets KeyWord. + + + + + Gets or sets MatchType. + + + + + Operator==. + + Left. + Right. + Bool. + + + + Operator!=. + + Left. + Right. + Bool. + + + + This updates the current package core to match another public core. + + Package Dependency. + + + + + + + + + + + + + + + + SearchRequestPackageMatchFilter. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + searchRequestPackageMatchFilter. + + + + Gets or sets PackageMatchField. + + + + + Gets or sets SearchRequestMatch. + + + + + Operator==. + + Left. + Right. + Bool. + + + + Operator!=. + + Left. + Right. + Bool. + + + + This updates the current package core to match another public core. + + Package Dependency. + + + + + + + + + + + + + + + + SearchVersion. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + SearchVersion. + + + + Gets or sets PackageVersion. + + + + + Gets or sets Channel. + + + + + Gets or sets PackageFamilyNames. + + + + + Gets or sets ProductCodes. + + + + + Operator==. + + Left. + Right. + Bool. + + + + Operator!=. + + Left. + Right. + Bool. + + + + + + + This Merges a search version if package version and channel match. + + Search Version. + + + + ConsolidationExpression Expression to be used for merging. + + Search Version. + Bool. + + + + + + + + + + + + + + + + SourceAgreement. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Agreement. + + + + Gets or sets AgreementLabel. + + + + + Gets or sets Agreement. + + + + + Gets or sets AgreementUrl. + + + + + Operator==. + + Left. + Right. + Bool. + + + + Operator!=. + + Left. + Right. + Bool. + + + + This updates the current package core to match another public core. + + Package Dependency. + + + + + + + + + + + + + + + + SourceAgreementExtended. + + + + + Initializes a new instance of the class. + + + + + Gets or sets AgreementsIdentifier. + + + + + Gets or sets Agreements. + + + + + Operator==. + + Left. + Right. + Bool. + + + + Operator!=. + + Left. + Right. + Bool. + + + + This updates the current agreement to match the other agreement. + + Package Dependency. + + + + + + + + + + + + + + + + Locale. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Locale. + + + + Gets or sets Moniker. + + + + + Operator==. + + Left. + Right. + Bool. + + + + Operator!=. + + Left. + Right. + Bool. + + + + + + + + + + + + + + + + + + + Server Information. + + + + + Initializes a new instance of the class. + + + + + Gets sourceIdentifier. + + + + + Gets serverSupportedVersions. + + + + + Gets SourceAgreements. + + + + + Gets UnsupportedPackageMatchFields. + + + + + Gets RequiredPackageMatchFields. + + + + + Gets UnsupportedQueryParameters. + + + + + Gets RequiredQueryParameters. + + + + + Installer. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Installer. + + + + Gets or sets InstallerIdentifier. + + + + + Gets or sets InstallerSha256. + + + + + Gets or sets InstallerUrl. + + + + + Gets or sets Architecture. + + + + + Gets or sets InstallerLocale. + + + + + Gets or sets Platform. + + + + + Gets or sets MinimumOsVersion. + + + + + Gets or sets InstallerType. + + + + + Gets or sets Scope. + + + + + Gets or sets SignatureSha256. + + + + + Gets or sets InstallModes. + + + + + Gets or sets InstallerSwitches. + + + + + Gets or sets InstallerSuccessCodes. + + + + + Gets or sets ExpectedReturnCodes. + + + + + Gets or sets UpgradeBehavior. + + + + + Gets or sets Commands. + + + + + Gets or sets Protocols. + + + + + Gets or sets FileExtensions. + + + + + Gets or sets Dependencies. + + + + + Gets or sets PackageFamilyName. + + + + + Gets or sets ProductCode. + + + + + Gets or sets Capabilities. + + + + + Gets or sets RestrictedCapabilities. + + + + + Gets or sets MSStoreProductIdentifier. + + + + + Gets or sets a value indicating whether InstallerAbortsTerminal is set. + This indicates if the package aborts the terminal during installation. + + + + + Gets or sets ReleaseDate. + + + + + Gets or sets a value indicating whether the installer requires an install location provided. + + + + + Gets or sets a value indicating whether the installer requires explicit upgrade. + + + + + Gets or sets the installer's elevation requirement. + + + + + Gets or sets UnsupportedOSArchitectures. + + + + + Gets or sets AppsAndFeaturesEntries. + + + + + Gets or sets Markets. + + + + + Operator==. + + Left. + Right. + Bool. + + + + Operator!=. + + Left. + Right. + Bool. + + + + + + + + + + + + + + + + + + + Installers. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Enumerable. + + + + Add new Installer. + + Installer to add. + + + + Update an Installer. + + New Installer. + + + + Remove an Installer. + + Installer Identifier to remove. + + + + Get Installers. + + Installer Identifier to get. + Installers. + + + + + + + Locale. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Locale. + + + + Gets or sets PackageLocale. + + + + + Gets or sets Publisher. + + + + + Gets or sets PublisherUrl. + + + + + Gets or sets PublisherSupportUrl. + + + + + Gets or sets PrivacyUrl. + + + + + Gets or sets Author. + + + + + Gets or sets PackageName. + + + + + Gets or sets PackageUrl. + + + + + Gets or sets License. + + + + + Gets or sets LicenseUrl. + + + + + Gets or sets Copyright. + + + + + Gets or sets CopyrightUrl. + + + + + Gets or sets ShortDescription. + + + + + Gets or sets Description. + + + + + Gets or sets ReleaseNotes. + + + + + Gets or sets ReleaseNotesUrl. + + + + + Gets or sets Agreements. + + + + + Gets or sets Tags. + + + + + Operator==. + + Left. + Right. + Bool. + + + + Operator!=. + + Left. + Right. + Bool. + + + + + + + + + + + + + + + + + + + Locales. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Enumerable. + + + + Add new Locale. + + Locale to add. + + + + Update an Locale. + + New Locale. + + + + Remove an Locale. + + Package Locale to remove. + + + + Get Installers. + + Package Locale to get. + Installers. + + + + + + + ManifestSearchRequest. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + ManifestSearchRequest. + + + + Gets or sets MaximumResults. + + + + + Gets or sets a value indicating whether to FetchAllManifests. + + + + + Gets or sets Query. + + + + + Gets or sets Query. + + + + + Gets or sets Query. + + + + + Operator==. + + Left. + Right. + Bool. + + + + Operator!=. + + Left. + Right. + Bool. + + + + + + + + + + + + + + + + + + + Manifest Search Response. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Package Identifier. + Package Name. + Publisher. + Search Versions. + + + + Initializes a new instance of the class. + + Package Identifier. + Package Name. + Publisher. + Search Version. + + + + Initializes a new instance of the class. + + Package Identifier. + + + + Initializes a new instance of the class. + + Package Identifier. + Package Name. + Publisher. + Package Version. + Channel. + Package Family Name. + Product Code. + + + + Gets or sets PackageIdentifier. + + + + + Gets or sets PackageName. + + + + + Gets or sets Publisher. + + + + + Gets or sets SearchVersions. + + + + + Operator==. + + Left. + Right. + Bool. + + + + Operator!=. + + Left. + Right. + Bool. + + + + This gets. + + Package Manifest. + Manifest Search Responses. + + + + Consolidates Manifest Search Responses. + + manifests. + Manifest Search Responses. + + + + + + + + + + + + + + + + + + + PackageCore. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + PackageCore. + + + + Gets or sets PackageIdentifier. + + + + + Operator==. + + Left. + Right. + Bool. + + + + Operator!=. + + Left. + Right. + Bool. + + + + + + + + + + + + + + + + + + + This is a manifest, which is an extension of the package core model, and the extended version model. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Package Core. + + + + Initializes a new instance of the class. + + Package Core. + + + + Gets or sets versions. + + + + + Converts to a Package Core. + + Package Core. + + + + This updates a Manifest to update match another Manifest. + + Manifest. + + + + Add Version. + + Version to add. + + + + Update a Version. + + Version to Update. + + + + Add Version. + + Version to add. + + + + Update a Version. + + Version to Update. + + + + Remove a Version. + + Version to Remove. + + + + Get Package Version. + + Package Version. + VersionsExtended. + + + + Add an Installer. + + Installer to Update. + Package Version to update in. + + + + Update an Installer. + + Installer to Update. + Package Version to update in. + + + + Remove an Installer. + + Installer to Update. + Package Version to update in. + + + + Get Installers. + + Installer to Get. + Package Version to get in. + Installers. + + + + Add an Locale. + + Installer to Update. + Package Version to update in. + + + + Update a Locale. + + Locale to Update. + Package Version to update in. + + + + Remove an Locale. + + Locale to Update. + Package Version to update in. + + + + Get Locale. + + Locale to Get. + Package Version to get in. + Locales. + + + + + + + + + + This is the core version model. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Version Core Model. + + + + Gets or sets PackageVersion. + + + + + Gets or sets Channel. + + + + + Gets or sets DefaultLocale. + + + + + Operator==. + + Left. + Right. + Bool. + + + + Operator!=. + + Left. + Right. + Bool. + + + + + + + + + + + + + + + + + + + Versions. + + + + + Initializes a new instance of the class. + + + + + This class holds our common validation process. + + + + + Performs Common Validation Process. + + Validatable Object. + Validatable Type. + + + + Performs Common Validation Process. + + Validatable Object. + Validation Results. + Validatable Type. + bool. + + + + Asserts an object is not null, and throws a validation error if it is. + + Object to Test. + Type of Object. + + + + Asserts a string is not null, and throws a validation error if it is. + + String to Test. + + + + ApiDateTimeValidator. + + + + + Initializes a new instance of the class. + + + + + Gets or sets a value indicating whether to Allow Null. + + + + + Public Facing Validation. + + Object to validate. + Validation Context. + Validation Result. + + + + Verifies if an object is a valid API DateTime based on the parameters. + + Object to validate. + Validation Context. + Validation Result. + + + + ReleaseDateValidator. + + + + + Initializes a new instance of the class. + + + + + ApiEnumValidator. + + + + + Initializes a new instance of the class. + + + + + Gets or sets Values. + + + + + Gets or sets StringComparer. + + + + + Gets or sets a value indicating whether to Allow Null. + + + + + Public Facing Validation. + + Object to validate. + Validation Context. + Validation Result. + + + + Verifies if an object is a valid API string based on the parameters. + + Object to validate. + Validation Context. + Validation Result. + + + + Architecture. + + + + + Initializes a new instance of the class. + + + + + ElevationRequirementValidator. + + + + + Initializes a new instance of the class. + + + + + Expected Return Code Response. + + + + + Initializes a new instance of the class. + + + + + InstallerTypeValidator. + + + + + Initializes a new instance of the class. + + + + + InstallModeValidator. + + + + + Initializes a new instance of the class. + + + + + MatchTypeValidatorSchema. + + + + + Initializes a new instance of the class. + + + + + PackageMatchFieldValidator. + + + + + Initializes a new instance of the class. + + + + + PlatformValidatorEnum. + + + + + Initializes a new instance of the class. + + + + + ScopeValidator. + + + + + Initializes a new instance of the class. + + + + + UnsupportedOSArchitecturesValidator. + + + + + Initializes a new instance of the class. + + + + + UpgradeBehaviorValidator. + + + + + Initializes a new instance of the class. + + + + + AgreementLabelValidator. + + + + + Initializes a new instance of the class. + + + + + AgreementIdentifierValidator. + + + + + Initializes a new instance of the class. + + + + + AgreementValidator. + + + + + Initializes a new instance of the class. + + + + + Base String Validation Attribute. + + + + + Initializes a new instance of the class. + + + + + Gets or sets a value indicating whether to Allow Null. + + + + + Gets or sets MatchPattern. + + + + + Gets or sets MinLength. + + + + + Gets or sets MaxLength. + + + + + Public Facing Validation. + + Object to validate. + Validation Context. + Validation Result. + + + + Verifies if an object is a valid API string based on the parameters. + + Object to validate. + Validation Context. + Validation Result. + + + + ApiVersionValidator. + + + + + Initializes a new instance of the class. + + + + + AuthorValidator. + + + + + Initializes a new instance of the class. + + + + + CapabilitiesValidator. + + + + + Initializes a new instance of the class. + + + + + ChannelValidator. + + + + + Initializes a new instance of the class. + + + + + CommandsValidator. + + + + + Initializes a new instance of the class. + + + + + ContinuationTokenValidator. + + + + + Initializes a new instance of the class. + + + + + CopyrightValidator. + + + + + Initializes a new instance of the class. + + + + + CustomSwitchValidator. + + + + + Initializes a new instance of the class. + + + + + Dependencies. + + + + + Initializes a new instance of the class. + + + + + DescriptionValidator. + + + + + Initializes a new instance of the class. + + + + + DisplayAndPublisherNameValidator. + + + + + Initializes a new instance of the class. + + + + + DisplayVersionValidator. + + + + + Initializes a new instance of the class. + + + + + FileExtensionsValidator. + + + + + Initializes a new instance of the class. + + + + + IApiStringValidator. + + + + + ValidateApiString. + + Value. + Validation Context. + ValidationResult. + + + + InstallerIdentifierValidatorValidator. + + + + + Initializes a new instance of the class. + + + + + InstallerSha256. + + + + + Initializes a new instance of the class. + + + + + KeyWordValidator. + + + + + Initializes a new instance of the class. + + + + + LicenseValidator. + + + + + Initializes a new instance of the class. + + + + + LocaleValidator. + + + + + Initializes a new instance of the class. + + + + + MarketValidator. + + + + + Initializes a new instance of the class. + + + + + MinimumOSVersionValidator. + + + + + Initializes a new instance of the class. + + + + + MSStoreProductIdentifierValidator. + + + + + Initializes a new instance of the class. + + + + + PackageFamilyNameValidator. + + + + + Initializes a new instance of the class. + + + + + PackageIdentifierValidator. + + + + + Initializes a new instance of the class. + + + + + PackageNameValidator. + + + + + Initializes a new instance of the class. + + + + + PackageVersionValidator. + + + + + Initializes a new instance of the class. + + + + + ProductCodeValidator. + + + + + Initializes a new instance of the class. + + + + + ProtocolsValidator. + + + + + Initializes a new instance of the class. + + + + + PublisherValidator. + + + + + Initializes a new instance of the class. + + + + + ReleaseNotesValidator. + + + + + Initializes a new instance of the class. + + + + + ShortDescriptionValidator. + + + + + Initializes a new instance of the class. + + + + + SignatureSha256Validator. + + + + + Initializes a new instance of the class. + + + + + SourceIdentifierValidator. + + + + + Initializes a new instance of the class. + + + + + SwitchValidator. + + + + + Initializes a new instance of the class. + + + + + TagValidator. + + + + + Initializes a new instance of the class. + + + + + UrlValidator. + + + + + Initializes a new instance of the class. + + + +