private FeedEntry DeserializeManifestV2(VsixPackagePartNode part, string fileName, string category) { var entry = new FeedEntry(fileName, category); using (var stream = part.Part.GetStream(FileMode.Open)) { using (var sr = new StreamReader(stream)) { var manifest = PackageManifest.Deserialize(sr.ReadToEnd()); entry.Id = manifest.Metadata.Identity.Id; entry.Title = manifest.Metadata.DisplayName; entry.Author = new FeedEntryAuthor { Name = manifest.Metadata.Identity.Publisher }; entry.Content = new FeedEntryContent { Src = BuildUri(category, fileName), Type = "octet/stream" }; entry.Vsix = new FeedEntryVsix { Id = manifest.Metadata.Identity.Id, Version = manifest.Metadata.Identity.Version }; entry.Summary = manifest.Metadata.Description; entry.MoreInfo = manifest.Metadata.MoreInfo; } } return(entry); }
private static VsixItem ReadVsixV1(VsixPackagePartNode packageNode, byte[] content) { using (var stream = packageNode.Part.GetStream(FileMode.Open)) { using (var sr = new StreamReader(stream)) { var vsixManifest = PackageManifest.Deserialize(sr.ReadToEnd()); return(new VsixItem(vsixManifest, content)); } } }