src/WingetCreateCore/Common/PackageParser.cs
/// <summary>
/// Parses packages for available metadata including Version, Publisher, Name, Descripion, License, etc.
/// </summary>
/// <param name="installerMetadataList">List of <see cref="InstallerMetadata"/>.</param>
/// <param name="manifests">Wrapper object for manifest object models.</param>
Parses packages for available metadata including Version, Publisher, Name, Descripion, License, etc.
Parses packages for available metadata including Version Publisher Name Descripion License etc .
public static void ParsePackages(List<InstallerMetadata> installerMetadataList, Manifests manifests)
        {
            manifests.VersionManifest = new VersionManifest();
            manifests.InstallerManifest = new InstallerManifest();
            manifests.DefaultLocaleManifest = new DefaultLocaleManifest();
            List<string> parseFailedInstallerUrls = new List<string>();
            foreach (var installerMetadata in installerMetadataList)
            {
                if (!ParsePackage(installerMetadata, manifests))
                {
                    parseFailedInstallerUrls.Add(installerMetadata.InstallerUrl);
                }
            }
            if (parseFailedInstallerUrls.Any())
            {
                throw new ParsePackageException(parseFailedInstallerUrls);
            }
        }
public static void ParsePackages ( List < InstallerMetadata > installerMetadataList , Manifests manifests ) { manifests . VersionManifest = new VersionManifest ( ) ; manifests . InstallerManifest = new InstallerManifest ( ) ; manifests . DefaultLocaleManifest = new DefaultLocaleManifest ( ) ; List < string > parseFailedInstallerUrls = new List < string > ( ) ; foreach ( var installerMetadata in installerMetadataList ) { if ( ! ParsePackage ( installerMetadata , manifests ) ) { parseFailedInstallerUrls . Add ( installerMetadata . InstallerUrl ) ; } } if ( parseFailedInstallerUrls . Any ( ) ) { throw new ParsePackageException ( parseFailedInstallerUrls ) ; } }
Parses packages for available metadata including Version, Publisher, Name, Descripion, License, etc.
Parses packages for available metadata including Version Publisher Name Descripion License etc .
installerMetadataList
List<InstallerMetadata>
List of .
List of .
manifests
Manifests
Wrapper object for manifest object models.
Wrapper object for manifest object models .