Exemplo n.º 1
0
        private void EnsureManifest()
        {
            using (Stream stream = _streamFactory())
            {
                var package = new ZipArchive(stream);

                ZipArchiveEntry manifestPart = package.GetManifest();

                if (manifestPart == null)
                {
                    throw new InvalidOperationException(NuGetResources.PackageDoesNotContainManifest);
                }

                using (Stream manifestStream = manifestPart.Open())
                {
                    ReadManifest(manifestStream);
                }
            }
        }