protected void ReadManifest(Stream manifestStream)
{
Manifest manifest = Manifest.ReadFrom(manifestStream);
IPackageMetadata metadata = manifest.Metadata;
Id = metadata.Id;
Version = metadata.Version;
Title = metadata.Title;
Authors = metadata.Authors;
Owners = metadata.Owners;
IconUrl = metadata.IconUrl;
LicenseUrl = metadata.LicenseUrl;
ProjectUrl = metadata.ProjectUrl;
RequireLicenseAcceptance = metadata.RequireLicenseAcceptance;
Description = metadata.Description;
Summary = metadata.Summary;
ReleaseNotes = metadata.ReleaseNotes;
Language = metadata.Language;
Tags = metadata.Tags;
Dependencies = metadata.Dependencies;
FrameworkAssemblies = metadata.FrameworkAssemblies;
Copyright = metadata.Copyright;
ManifestReferences = manifest.Metadata.References;
IEnumerable<string> references = (ManifestReferences ?? Enumerable.Empty<ManifestReference>()).Select(c => c.File);
_references = new HashSet<string>(references, StringComparer.OrdinalIgnoreCase);
// Ensure tags start and end with an empty " " so we can do contains filtering reliably
if (!String.IsNullOrEmpty(Tags))
{
Tags = " " + Tags + " ";
}
}