public void Populate(ManifestMetadata manifestMetadata) { IPackageMetadata metadata = manifestMetadata; Id = metadata.Id; Version = metadata.Version; Title = metadata.Title; Authors.AddRange(metadata.Authors); Owners.AddRange(metadata.Owners); IconUrl = metadata.IconUrl; LicenseUrl = metadata.LicenseUrl; ProjectUrl = metadata.ProjectUrl; RequireLicenseAcceptance = metadata.RequireLicenseAcceptance; // DevelopmentDependency = metadata.DevelopmentDependency; Description = metadata.Description; Summary = metadata.Summary; ReleaseNotes = metadata.ReleaseNotes; Language = metadata.Language; Copyright = metadata.Copyright; MinClientVersion = metadata.MinClientVersion; if (metadata.Tags != null) { Tags.AddRange(ParseTags(metadata.Tags)); } DependencySets.AddRange(metadata.DependencySets); FrameworkReferences.AddRange(metadata.FrameworkAssemblies); if (manifestMetadata.ReferenceSets != null) { PackageAssemblyReferences.AddRange(manifestMetadata.ReferenceSets.Select(r => new PackageReferenceSet(r))); } }
private void ReadManifest(Stream stream, string basePath) { // Deserialize the document and extract the metadata Manifest manifest = Manifest.ReadFrom(stream); IPackageMetadata metadata = manifest.Metadata; Id = metadata.Id; Version = metadata.Version; Title = metadata.Title; Authors.AddRange(metadata.Authors); Owners.AddRange(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; Copyright = metadata.Copyright; Serviceable = metadata.Serviceable; MinClientVersion = metadata.MinClientVersion; DevelopmentDependency = metadata.DevelopmentDependency; if (metadata.Tags != null) { Tags.AddRange(ParseTags(metadata.Tags)); } DependencySets.AddRange(metadata.DependencySets); FrameworkReferences.AddRange(metadata.FrameworkAssemblies); if (metadata.PackageAssemblyReferences != null) { PackageAssemblyReferences.AddRange(metadata.PackageAssemblyReferences); } // If there's no base path then ignore the files node if (basePath != null) { if (manifest.Files == null) { AddFiles(basePath, @"**\*.*", null); } else { foreach (ManifestFile file in manifest.Files) { AddFiles(basePath, file.Source, file.Target, file.Exclude); } } } }
public void Populate(ManifestMetadata manifestMetadata) { IPackageMetadata metadata = manifestMetadata; Id = metadata.Id; Version = metadata.Version; Title = metadata.Title; Authors.AddRange(metadata.Authors); Owners.AddRange(metadata.Owners); IconUrl = metadata.IconUrl; LicenseUrl = metadata.LicenseUrl; ProjectUrl = metadata.ProjectUrl; RequireLicenseAcceptance = metadata.RequireLicenseAcceptance; DevelopmentDependency = metadata.DevelopmentDependency; Description = metadata.Description; Summary = metadata.Summary; ReleaseNotes = metadata.ReleaseNotes; Language = metadata.Language; Copyright = metadata.Copyright; MinClientVersion = metadata.MinClientVersion; ContentFiles = new Collection <ManifestContentFiles>(manifestMetadata.ContentFiles); ProjectSourceUrl = metadata.ProjectSourceUrl; PackageSourceUrl = metadata.PackageSourceUrl; DocsUrl = metadata.DocsUrl; WikiUrl = metadata.WikiUrl; MailingListUrl = metadata.MailingListUrl; BugTrackerUrl = metadata.BugTrackerUrl; Replaces.AddRange(metadata.Replaces); Provides.AddRange(metadata.Provides); Conflicts.AddRange(metadata.Conflicts); SoftwareDisplayName = metadata.SoftwareDisplayName; SoftwareDisplayVersion = metadata.SoftwareDisplayVersion; if (metadata.Tags != null) { Tags.AddRange(ParseTags(metadata.Tags)); } DependencySets.AddRange(metadata.DependencySets); FrameworkReferences.AddRange(metadata.FrameworkAssemblies); if (manifestMetadata.ReferenceSets != null) { PackageAssemblyReferences.AddRange(manifestMetadata.ReferenceSets.Select(r => new PackageReferenceSet(r))); } }
public void Populate(ManifestMetadata manifestMetadata) { IPackageMetadata metadata = manifestMetadata; Id = metadata.Id; Version = metadata.Version; Title = metadata.Title; Authors.AddRange(metadata.Authors); Owners.AddRange(metadata.Owners); IconUrl = metadata.IconUrl; LicenseUrl = metadata.LicenseUrl; ProjectUrl = metadata.ProjectUrl; RequireLicenseAcceptance = metadata.RequireLicenseAcceptance; DevelopmentDependency = metadata.DevelopmentDependency; Serviceable = metadata.Serviceable; Description = metadata.Description; Summary = metadata.Summary; ReleaseNotes = metadata.ReleaseNotes; Language = metadata.Language; Copyright = metadata.Copyright; MinClientVersion = metadata.MinClientVersion; Repository = metadata.Repository; ContentFiles = new Collection <ManifestContentFiles>(manifestMetadata.ContentFiles.ToList()); LicenseMetadata = metadata.LicenseMetadata; Icon = metadata.Icon; if (metadata.Tags != null) { Tags.AddRange(ParseTags(metadata.Tags)); } DependencyGroups.AddRange(metadata.DependencyGroups); FrameworkReferences.AddRange(metadata.FrameworkReferences); FrameworkReferenceGroups.AddRange(metadata.FrameworkReferenceGroups); if (manifestMetadata.PackageAssemblyReferences != null) { PackageAssemblyReferences.AddRange(manifestMetadata.PackageAssemblyReferences); } if (manifestMetadata.PackageTypes != null) { PackageTypes = new Collection <PackageType>(metadata.PackageTypes.ToList()); } }
private void ReadManifest(Stream stream, string basePath) { // Deserialize the document and extract the metadata Manifest manifest = Manifest.ReadFrom(stream); IPackageMetadata metadata = manifest.Metadata; Id = metadata.Id; Version = metadata.Version; Title = metadata.Title; Authors.AddRange(metadata.Authors); Owners.AddRange(metadata.Owners); IconUrl = metadata.IconUrl; LicenseUrl = metadata.LicenseUrl; ProjectUrl = metadata.ProjectUrl; RequireLicenseAcceptance = metadata.RequireLicenseAcceptance; Description = metadata.Description; Summary = metadata.Summary; Language = metadata.Language; if (metadata.Tags != null) { Tags.AddRange(ParseTags(metadata.Tags)); } Dependencies.AddRange(metadata.Dependencies); FrameworkReferences.AddRange(metadata.FrameworkAssemblies); // If there's no base path then ignore the files node if (basePath != null) { if (manifest.Files == null || !manifest.Files.Any()) { AddFiles(basePath, @"**\*.*", null); } else { foreach (var file in manifest.Files) { AddFiles(basePath, file.Source, file.Target); } } } }
public void Populate(IPackageMetadata metadata) { Id = metadata.Id; Version = metadata.Version; Title = metadata.Title; Authors.AddRange(metadata.Authors); Owners.AddRange(metadata.Owners); IconUrl = metadata.IconUrl; LicenseUrl = metadata.LicenseUrl; ProjectUrl = metadata.ProjectUrl; RequireLicenseAcceptance = metadata.RequireLicenseAcceptance; Description = metadata.Description; Summary = metadata.Summary; Language = metadata.Language; if (metadata.Tags != null) { Tags.AddRange(ParseTags(metadata.Tags)); } Dependencies.AddRange(metadata.Dependencies); FrameworkReferences.AddRange(metadata.FrameworkAssemblies); }