public override IQueryable <IPackage> GetPackages()
        {
            IEnumerable <IPackage> repositoryPackages = SourceRepository.GetPackages().ToList();
            IEnumerable <IPackage> packages           = from theme in _themeManifests
                                                        let id = PackagingUtils.BuildPackageId(theme.ThemeName, "Theme")
                                                                 let version = theme.Version != null ? new SemanticVersion(theme.Version) : null
                                                                               let package = repositoryPackages.FirstOrDefault(p => p.Id == id && (version == null || p.Version == version))
                                                                                             where package != null
                                                                                             select package;

            return(packages.AsQueryable());
        }
        public override IQueryable <IPackage> GetPackages()
        {
            IEnumerable <IPackage> repositoryPackages = SourceRepository.GetPackages().ToList();
            IEnumerable <IPackage> packages           = from plugin in _descriptors
                                                        let id = PackagingUtils.BuildPackageId(plugin.SystemName, "Plugin")
                                                                 let version = plugin.Version != null ? new SemanticVersion(plugin.Version) : null
                                                                               let package = repositoryPackages.FirstOrDefault(p => p.Id == id && (version == null || p.Version == version))
                                                                                             where package != null
                                                                                             select package;

            return(packages.AsQueryable());
        }
Пример #3
0
        private static void SetCoreProperties(BuildContext context, ExtensionDescriptor extensionDescriptor)
        {
            context.Builder.Id          = PackagingUtils.BuildPackageId(extensionDescriptor.Id, extensionDescriptor.ExtensionType);
            context.Builder.Version     = new SemanticVersion(extensionDescriptor.Version);
            context.Builder.Title       = extensionDescriptor.Name ?? extensionDescriptor.Id;
            context.Builder.Description = extensionDescriptor.Description.NullEmpty() ?? "No Description";
            context.Builder.Authors.Add(extensionDescriptor.Author ?? "Unknown");

            if (Uri.IsWellFormedUriString(extensionDescriptor.WebSite, UriKind.Absolute))
            {
                context.Builder.ProjectUrl = new Uri(extensionDescriptor.WebSite);
            }
        }