From 173af2bcbef72a6e9788aaf8014c54157bb4d7f4 Mon Sep 17 00:00:00 2001 From: Andre Rodrigues Date: Wed, 16 Mar 2011 08:55:07 -0700 Subject: [PATCH] Extending manifest parser to support flatenned default feature. --HG-- branch : dev --- .../ExtensionLoaderCoordinatorTests.cs | 98 +++++++++++++++++++ src/Orchard.Web/Core/Common/Module.txt | 8 +- src/Orchard.Web/Core/Containers/Module.txt | 8 +- src/Orchard.Web/Core/Contents/Module.txt | 6 +- src/Orchard.Web/Core/Dashboard/Module.txt | 6 +- src/Orchard.Web/Core/Feeds/Module.txt | 6 +- src/Orchard.Web/Core/HomePage/Module.txt | 6 +- src/Orchard.Web/Core/Navigation/Module.txt | 6 +- src/Orchard.Web/Core/Reports/Module.txt | 6 +- src/Orchard.Web/Core/Routable/Module.txt | 8 +- src/Orchard.Web/Core/Scheduling/Module.txt | 6 +- src/Orchard.Web/Core/Settings/Module.txt | 6 +- src/Orchard.Web/Core/Shapes/Module.txt | 6 +- src/Orchard.Web/Core/XmlRpc/Module.txt | 6 +- src/Orchard.Web/Modules/Lucene/Module.txt | 7 +- .../Modules/Orchard.ArchiveLater/Module.txt | 9 +- .../Modules/Orchard.Blogs/Module.txt | 8 +- .../Modules/Orchard.CodeGeneration/Module.txt | 7 +- .../Modules/Orchard.Comments/Module.txt | 9 +- .../Modules/Orchard.ContentTypes/Module.txt | 9 +- .../Modules/Orchard.DesignerTools/Module.txt | 8 +- .../Modules/Orchard.Email/Module.txt | 9 +- .../Modules/Orchard.Experimental/Module.txt | 5 +- .../Modules/Orchard.ImportExport/Module.txt | 7 +- .../Modules/Orchard.Indexing/Module.txt | 7 +- .../Modules/Orchard.Lists/Module.txt | 9 +- .../Modules/Orchard.Localization/Module.txt | 9 +- .../Modules/Orchard.Media/Module.txt | 7 +- .../Modules/Orchard.MediaPicker/Module.txt | 9 +- .../Modules/Orchard.Messaging/Module.txt | 9 +- .../Modules/Orchard.Migrations/Module.txt | 6 +- .../Modules/Orchard.Modules/Module.txt | 7 +- .../Modules/Orchard.MultiTenancy/Module.txt | 7 +- .../Modules/Orchard.Packaging/Module.txt | 8 +- .../Modules/Orchard.Pages/Module.txt | 9 +- .../Modules/Orchard.PublishLater/Module.txt | 9 +- .../Modules/Orchard.Recipes/Module.txt | 7 +- .../Modules/Orchard.Roles/Module.txt | 9 +- .../Modules/Orchard.Scripting.Dlr/Module.txt | 9 +- .../Modules/Orchard.Scripting/Module.txt | 6 +- .../Modules/Orchard.Search/Module.txt | 9 +- .../Modules/Orchard.Setup/Module.txt | 7 +- .../Modules/Orchard.Tags/Module.txt | 9 +- .../Modules/Orchard.Themes/Module.txt | 7 +- .../Modules/Orchard.Users/Module.txt | 9 +- .../Modules/Orchard.Widgets/Module.txt | 9 +- .../Modules/Orchard.jQuery/Module.txt | 7 +- src/Orchard.Web/Modules/TinyMce/Module.txt | 7 +- .../Extensions/Folders/ExtensionFolders.cs | 67 +++++++++---- 49 files changed, 260 insertions(+), 258 deletions(-) diff --git a/src/Orchard.Tests/Environment/Extensions/ExtensionLoaderCoordinatorTests.cs b/src/Orchard.Tests/Environment/Extensions/ExtensionLoaderCoordinatorTests.cs index 956f1993d..4b32af63c 100644 --- a/src/Orchard.Tests/Environment/Extensions/ExtensionLoaderCoordinatorTests.cs +++ b/src/Orchard.Tests/Environment/Extensions/ExtensionLoaderCoordinatorTests.cs @@ -169,6 +169,26 @@ Features: Assert.That(descriptor.Features.First().Description, Is.EqualTo("My super wiki module for Orchard.")); } + [Test] + public void ExtensionDescriptorsShouldBeParsedForMinimalModuleTxtWithSimpleFormat() { + + _folders.Manifests.Add("SuperWiki", @" +Name: SuperWiki +Version: 1.0.3 +OrchardVersion: 1 +Description: My super wiki module for Orchard. +"); + + var descriptor = _manager.AvailableExtensions().Single(); + Assert.That(descriptor.Id, Is.EqualTo("SuperWiki")); + Assert.That(descriptor.Version, Is.EqualTo("1.0.3")); + Assert.That(descriptor.OrchardVersion, Is.EqualTo("1")); + Assert.That(descriptor.Features.Count(), Is.EqualTo(1)); + Assert.That(descriptor.Features.First().Id, Is.EqualTo("SuperWiki")); + Assert.That(descriptor.Features.First().Extension.Id, Is.EqualTo("SuperWiki")); + Assert.That(descriptor.Features.First().Description, Is.EqualTo("My super wiki module for Orchard.")); + } + [Test] public void ExtensionDescriptorsShouldBeParsedForCompleteModuleTxt() { @@ -250,6 +270,84 @@ Features: } } + [Test] + public void ExtensionDescriptorsShouldBeParsedForCompleteModuleTxtWithSimpleFormat() { + + _folders.Manifests.Add("AnotherWiki", @" +Name: AnotherWiki +Author: Coder Notaprogrammer +Website: http://anotherwiki.codeplex.com +Version: 1.2.3 +OrchardVersion: 1 +Description: Module Description +FeatureDescription: My super wiki module for Orchard. +Dependencies: Versioning, Search +Category: Content types +Features: + AnotherWiki Editor: + Description: A rich editor for wiki contents. + Dependencies: TinyMCE, AnotherWiki + Category: Input methods + AnotherWiki DistributionList: + Description: Sends e-mail alerts when wiki contents gets published. + Dependencies: AnotherWiki, Email Subscriptions + Category: Email + AnotherWiki Captcha: + Description: Kills spam. Or makes it zombie-like. + Dependencies: AnotherWiki, reCaptcha + Category: Spam +"); + + var descriptor = _manager.AvailableExtensions().Single(); + Assert.That(descriptor.Id, Is.EqualTo("AnotherWiki")); + Assert.That(descriptor.Name, Is.EqualTo("AnotherWiki")); + Assert.That(descriptor.Author, Is.EqualTo("Coder Notaprogrammer")); + Assert.That(descriptor.WebSite, Is.EqualTo("http://anotherwiki.codeplex.com")); + Assert.That(descriptor.Version, Is.EqualTo("1.2.3")); + Assert.That(descriptor.OrchardVersion, Is.EqualTo("1")); + Assert.That(descriptor.Description, Is.EqualTo("Module Description")); + Assert.That(descriptor.Features.Count(), Is.EqualTo(4)); + foreach (var featureDescriptor in descriptor.Features) { + switch (featureDescriptor.Id) { + case "AnotherWiki": + Assert.That(featureDescriptor.Extension, Is.SameAs(descriptor)); + Assert.That(featureDescriptor.Description, Is.EqualTo("My super wiki module for Orchard.")); + Assert.That(featureDescriptor.Category, Is.EqualTo("Content types")); + Assert.That(featureDescriptor.Dependencies.Count(), Is.EqualTo(2)); + Assert.That(featureDescriptor.Dependencies.Contains("Versioning")); + Assert.That(featureDescriptor.Dependencies.Contains("Search")); + break; + case "AnotherWiki Editor": + Assert.That(featureDescriptor.Extension, Is.SameAs(descriptor)); + Assert.That(featureDescriptor.Description, Is.EqualTo("A rich editor for wiki contents.")); + Assert.That(featureDescriptor.Category, Is.EqualTo("Input methods")); + Assert.That(featureDescriptor.Dependencies.Count(), Is.EqualTo(2)); + Assert.That(featureDescriptor.Dependencies.Contains("TinyMCE")); + Assert.That(featureDescriptor.Dependencies.Contains("AnotherWiki")); + break; + case "AnotherWiki DistributionList": + Assert.That(featureDescriptor.Extension, Is.SameAs(descriptor)); + Assert.That(featureDescriptor.Description, Is.EqualTo("Sends e-mail alerts when wiki contents gets published.")); + Assert.That(featureDescriptor.Category, Is.EqualTo("Email")); + Assert.That(featureDescriptor.Dependencies.Count(), Is.EqualTo(2)); + Assert.That(featureDescriptor.Dependencies.Contains("AnotherWiki")); + Assert.That(featureDescriptor.Dependencies.Contains("Email Subscriptions")); + break; + case "AnotherWiki Captcha": + Assert.That(featureDescriptor.Extension, Is.SameAs(descriptor)); + Assert.That(featureDescriptor.Description, Is.EqualTo("Kills spam. Or makes it zombie-like.")); + Assert.That(featureDescriptor.Category, Is.EqualTo("Spam")); + Assert.That(featureDescriptor.Dependencies.Count(), Is.EqualTo(2)); + Assert.That(featureDescriptor.Dependencies.Contains("AnotherWiki")); + Assert.That(featureDescriptor.Dependencies.Contains("reCaptcha")); + break; + default: + Assert.Fail("Features not parsed correctly"); + break; + } + } + } + [Test] public void ExtensionManagerShouldLoadFeatures() { var extensionLoader = new StubLoaders(); diff --git a/src/Orchard.Web/Core/Common/Module.txt b/src/Orchard.Web/Core/Common/Module.txt index 087347569..eb12f1208 100644 --- a/src/Orchard.Web/Core/Common/Module.txt +++ b/src/Orchard.Web/Core/Common/Module.txt @@ -5,8 +5,6 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: The common module introduces content parts that are going to be used by most content types (common, body and routable). -Features: - Common: - Description: Core content parts. - Dependencies: Settings - Category: Core +FeatureDescription: Core content parts. +Dependencies: Settings +Category: Core diff --git a/src/Orchard.Web/Core/Containers/Module.txt b/src/Orchard.Web/Core/Containers/Module.txt index 0831f5204..ad2876565 100644 --- a/src/Orchard.Web/Core/Containers/Module.txt +++ b/src/Orchard.Web/Core/Containers/Module.txt @@ -5,8 +5,6 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: The containers module introduces container and containable behaviors for content items. -Features: - Containers: - Description: Container and containable parts to enable parent-child relationships between content items. - Dependencies: Contents, Routable - Category: Content +FeatureDescription: Container and containable parts to enable parent-child relationships between content items. +Dependencies: Contents, Routable +Category: Content diff --git a/src/Orchard.Web/Core/Contents/Module.txt b/src/Orchard.Web/Core/Contents/Module.txt index 93bb50678..4ef1c996b 100644 --- a/src/Orchard.Web/Core/Contents/Module.txt +++ b/src/Orchard.Web/Core/Contents/Module.txt @@ -5,7 +5,5 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: The contents module enables the creation of custom content types. -Features: - Contents: - Description: Default custom content type definition, creation and management. - Category: Core +FeatureDescription: Default custom content type definition, creation and management. +Category: Core diff --git a/src/Orchard.Web/Core/Dashboard/Module.txt b/src/Orchard.Web/Core/Dashboard/Module.txt index a4be51307..84c73eb6d 100644 --- a/src/Orchard.Web/Core/Dashboard/Module.txt +++ b/src/Orchard.Web/Core/Dashboard/Module.txt @@ -5,7 +5,5 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: The dashboard module is providing the dashboard screen of the admininstration UI of the application. -Features: - Dashboard: - Description: Standard admin dashboard. - Category: Core +FeatureDescription: Standard admin dashboard. +Category: Core diff --git a/src/Orchard.Web/Core/Feeds/Module.txt b/src/Orchard.Web/Core/Feeds/Module.txt index 258ca1e6c..98daf53e3 100644 --- a/src/Orchard.Web/Core/Feeds/Module.txt +++ b/src/Orchard.Web/Core/Feeds/Module.txt @@ -5,7 +5,5 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: The Feeds module is providing RSS feeds to content items. -Features: - Feeds: - Description: RSS feeds for content items. - Category: Syndication +FeatureDescription: RSS feeds for content items. +Category: Syndication diff --git a/src/Orchard.Web/Core/HomePage/Module.txt b/src/Orchard.Web/Core/HomePage/Module.txt index 42d21fe63..05482e351 100644 --- a/src/Orchard.Web/Core/HomePage/Module.txt +++ b/src/Orchard.Web/Core/HomePage/Module.txt @@ -5,7 +5,5 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: The HomePage module enables the promotion of a content item or container to be the home page of the site. -Features: - HomePage: - Description: Standard site home page that allows a specified content type or container to *be* the home page. - Category: Core +FeatureDescription: Standard site home page that allows a specified content type or container to *be* the home page. +Category: Core diff --git a/src/Orchard.Web/Core/Navigation/Module.txt b/src/Orchard.Web/Core/Navigation/Module.txt index b6ee15e3a..b5ca0b387 100644 --- a/src/Orchard.Web/Core/Navigation/Module.txt +++ b/src/Orchard.Web/Core/Navigation/Module.txt @@ -5,7 +5,5 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: The navigation module creates and manages a simple navigation menu for the front-end of the application and allows you to add content items to the admin menu. -Features: - Navigation: - Description: Menu management. - Category: Core +FeatureDescription: Menu management. +Category: Core diff --git a/src/Orchard.Web/Core/Reports/Module.txt b/src/Orchard.Web/Core/Reports/Module.txt index 56fe01490..166bf79e4 100644 --- a/src/Orchard.Web/Core/Reports/Module.txt +++ b/src/Orchard.Web/Core/Reports/Module.txt @@ -5,7 +5,5 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: The dashboard module is providing the reports screen of the application. -Features: - Reports: - Description: Reports management. - Category: Core +FeatureDescription: Reports management. +Category: Core diff --git a/src/Orchard.Web/Core/Routable/Module.txt b/src/Orchard.Web/Core/Routable/Module.txt index 8d6fbfca1..c7b53836f 100644 --- a/src/Orchard.Web/Core/Routable/Module.txt +++ b/src/Orchard.Web/Core/Routable/Module.txt @@ -5,8 +5,6 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: The routable module enables content items to be accessed through a friendly human-readable URL. -Features: - Routable: - Description: Routable content part. - Dependencies: Settings - Category: Core +FeatureDescription: Routable content part. +Dependencies: Settings +Category: Core diff --git a/src/Orchard.Web/Core/Scheduling/Module.txt b/src/Orchard.Web/Core/Scheduling/Module.txt index bce5c78f0..25a9bea67 100644 --- a/src/Orchard.Web/Core/Scheduling/Module.txt +++ b/src/Orchard.Web/Core/Scheduling/Module.txt @@ -5,7 +5,5 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: The scheduling module enables background task scheduling. -Features: - Scheduling: - Description: Scheduled background tasks. - Category: Core +FeatureDescription: Scheduled background tasks. +Category: Core diff --git a/src/Orchard.Web/Core/Settings/Module.txt b/src/Orchard.Web/Core/Settings/Module.txt index 00692242f..c5ea07ec1 100644 --- a/src/Orchard.Web/Core/Settings/Module.txt +++ b/src/Orchard.Web/Core/Settings/Module.txt @@ -5,7 +5,5 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: The settings module creates site settings that other modules can contribute to. -Features: - Settings: - Description: Site settings. - Category: Core +FeatureDescription: Site settings. +Category: Core diff --git a/src/Orchard.Web/Core/Shapes/Module.txt b/src/Orchard.Web/Core/Shapes/Module.txt index eaea61ca0..d21318362 100644 --- a/src/Orchard.Web/Core/Shapes/Module.txt +++ b/src/Orchard.Web/Core/Shapes/Module.txt @@ -5,7 +5,5 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: The shapes module contains core shape templates and display hooks. -Features: - Shapes: - Description: Core shape templates and display hooks. - Category: Core +FeatureDescription: Core shape templates and display hooks. +Category: Core diff --git a/src/Orchard.Web/Core/XmlRpc/Module.txt b/src/Orchard.Web/Core/XmlRpc/Module.txt index b200c5aed..c930e26b9 100644 --- a/src/Orchard.Web/Core/XmlRpc/Module.txt +++ b/src/Orchard.Web/Core/XmlRpc/Module.txt @@ -5,7 +5,5 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: The XmlRpc module enables creation of contents from client applications such as LiveWriter. -Features: - XmlRpc: - Description: XML-RPC opt-in implementation. - Category: Content Publishing +FeatureDescription: XML-RPC opt-in implementation. +Category: Content Publishing diff --git a/src/Orchard.Web/Modules/Lucene/Module.txt b/src/Orchard.Web/Modules/Lucene/Module.txt index 4aa8937c7..50bd944f8 100644 --- a/src/Orchard.Web/Modules/Lucene/Module.txt +++ b/src/Orchard.Web/Modules/Lucene/Module.txt @@ -5,8 +5,5 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: The Lucene module enables the site to be indexed using Lucene.NET. The index generated by this module can then be used by the search module to provide an integrated full-text search experience to a web site. -Features: - Lucene: - Name: Lucene - Description: Lucene indexing services. - Category: Search +FeatureDescription: Lucene indexing services. +Category: Search diff --git a/src/Orchard.Web/Modules/Orchard.ArchiveLater/Module.txt b/src/Orchard.Web/Modules/Orchard.ArchiveLater/Module.txt index 577482193..07e5d8824 100644 --- a/src/Orchard.Web/Modules/Orchard.ArchiveLater/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.ArchiveLater/Module.txt @@ -5,9 +5,6 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: The ArchiveLater module introduces scheduled archiving functionality. -Features: - Orchard.ArchiveLater: - Name: Archive Later - Description: Scheduled archiving. - Category: Content - Dependencies: Common, Scheduling, Orchard.jQuery +FeatureDescription: Scheduled archiving. +Category: Content +Dependencies: Common, Scheduling, Orchard.jQuery diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Module.txt b/src/Orchard.Web/Modules/Orchard.Blogs/Module.txt index 897297e90..973c4a830 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Module.txt @@ -5,12 +5,10 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: The Orchard Blogs module is implementing basic blogging features. +FeatureDescription: A simple web log. +Dependencies: Shapes, Common, Routable, Feeds, Navigation, Orchard.Widgets, Orchard.jQuery, Orchard.PublishLater +Category: Content Features: - Orchard.Blogs: - Name: Blogs - Description: A simple web log. - Dependencies: Shapes, Common, Routable, Feeds, Navigation, Orchard.Widgets, Orchard.jQuery, Orchard.PublishLater - Category: Content Orchard.Blogs.RemotePublishing: Name: Remote Blog Publishing Description: Blog easier using a dedicated MetaWeblogAPI-compatible publishing tool. diff --git a/src/Orchard.Web/Modules/Orchard.CodeGeneration/Module.txt b/src/Orchard.Web/Modules/Orchard.CodeGeneration/Module.txt index d2eda5c93..b3c6a1662 100644 --- a/src/Orchard.Web/Modules/Orchard.CodeGeneration/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.CodeGeneration/Module.txt @@ -5,8 +5,5 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: Tools to create Orchard components. -Features: - Orchard.CodeGeneration: - Name: Code Generation - Description: Tools to create Orchard components. - Category: Developer +FeatureDescription: Tools to create Orchard components. +Category: Developer diff --git a/src/Orchard.Web/Modules/Orchard.Comments/Module.txt b/src/Orchard.Web/Modules/Orchard.Comments/Module.txt index 99b8da725..264c5fb66 100644 --- a/src/Orchard.Web/Modules/Orchard.Comments/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.Comments/Module.txt @@ -5,9 +5,6 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: The comments system implemented by this module can be applied to arbitrary Orchard content types, such as blogs and pages. It includes comment validation and spam protection through the Akismet service. -Features: - Orchard.Comments: - Name: Comments - Description: Standard content item comments. - Dependencies: Settings - Category: Social +FeatureDescription: Standard content item comments. +Dependencies: Settings +Category: Social diff --git a/src/Orchard.Web/Modules/Orchard.ContentTypes/Module.txt b/src/Orchard.Web/Modules/Orchard.ContentTypes/Module.txt index 02323f921..5cecf48e2 100644 --- a/src/Orchard.Web/Modules/Orchard.ContentTypes/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.ContentTypes/Module.txt @@ -4,9 +4,6 @@ Author: The Orchard Team Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 -Features: - Orchard.ContentTypes: - Name: Content Types - Description: ContentTypes modules enables the creation and alteration of content types not based on code. - Dependencies: Contents - Category: Content +Description: ContentTypes modules enables the creation and alteration of content types not based on code. +Dependencies: Contents +Category: Content diff --git a/src/Orchard.Web/Modules/Orchard.DesignerTools/Module.txt b/src/Orchard.Web/Modules/Orchard.DesignerTools/Module.txt index f3a68792e..85fa9849a 100644 --- a/src/Orchard.Web/Modules/Orchard.DesignerTools/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.DesignerTools/Module.txt @@ -5,12 +5,10 @@ Website: http://orchardproject.net Version: 1.0 OrchardVersion: 1.0 Description: Contains designer tools to ease the Themes development process +Category: Designer +FeatureDescription: Displays all currently displayed shapes and some information to customize them +Dependencies: Orchard.jQuery Features: - Orchard.DesignerTools: - Name: Shape Tracing - Category: Designer - Description: Displays all currently displayed shapes and some information to customize them - Dependencies: Orchard.jQuery UrlAlternates: Name: Url Alternates Category: Designer diff --git a/src/Orchard.Web/Modules/Orchard.Email/Module.txt b/src/Orchard.Web/Modules/Orchard.Email/Module.txt index 3b94a6489..5e914978f 100644 --- a/src/Orchard.Web/Modules/Orchard.Email/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.Email/Module.txt @@ -5,9 +5,6 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: The Email Messaging module adds Email sending functionalities. -Features: - Orchard.Email: - Name: Email - Description: Email Messaging services. - Category: Messaging - Dependencies: Orchard.Messaging +FeatureDescription: Email Messaging services. +Category: Messaging +Dependencies: Orchard.Messaging diff --git a/src/Orchard.Web/Modules/Orchard.Experimental/Module.txt b/src/Orchard.Web/Modules/Orchard.Experimental/Module.txt index 17a330d0c..8ee2d37dd 100644 --- a/src/Orchard.Web/Modules/Orchard.Experimental/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.Experimental/Module.txt @@ -5,11 +5,8 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: An assortment of debugging tools. +Category: Developer Features: - Orchard.Experimental: - Name: Experimental - Description: An assortment of debugging tools. - Category: Developer Profiling: Name: Profiling Description: Tools to help profile Orchard. diff --git a/src/Orchard.Web/Modules/Orchard.ImportExport/Module.txt b/src/Orchard.Web/Modules/Orchard.ImportExport/Module.txt index dda794f4c..b36ef0d8d 100644 --- a/src/Orchard.Web/Modules/Orchard.ImportExport/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.ImportExport/Module.txt @@ -5,8 +5,5 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: Provides content item data import and export capability. -Features: - Orchard.ImportExport: - Name: Import Export - Description: Imports and exports content item data - Category: Content +FeatureDescription: Imports and exports content item data +Category: Content diff --git a/src/Orchard.Web/Modules/Orchard.Indexing/Module.txt b/src/Orchard.Web/Modules/Orchard.Indexing/Module.txt index 7b4a9b65d..8f9a90f11 100644 --- a/src/Orchard.Web/Modules/Orchard.Indexing/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.Indexing/Module.txt @@ -5,8 +5,5 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: The Indexing module enables the site to be indexed. The index generated by this module can then be used by the search module to provide an integrated full-text search experience to a web site. -Features: - Orchard.Indexing: - Name: Indexing - Description: Indexing infrastructure. Requires an index implementation like the Lucene module. - Category: Search +FeatureDescription: Indexing infrastructure. Requires an index implementation like the Lucene module. +Category: Search diff --git a/src/Orchard.Web/Modules/Orchard.Lists/Module.txt b/src/Orchard.Web/Modules/Orchard.Lists/Module.txt index 12829b5ad..ebf6309bb 100644 --- a/src/Orchard.Web/Modules/Orchard.Lists/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.Lists/Module.txt @@ -5,9 +5,6 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: Introduces a preconfigured container-enabled content type. -Features: - Orchard.Lists: - Name: Lists - Description: A basic container-enabled content type. - Dependencies: Contents, Containers, Navigation - Category: Content +FeatureDescription: A basic container-enabled content type. +Dependencies: Contents, Containers, Navigation +Category: Content diff --git a/src/Orchard.Web/Modules/Orchard.Localization/Module.txt b/src/Orchard.Web/Modules/Orchard.Localization/Module.txt index f0b61161e..2232ddd8a 100644 --- a/src/Orchard.Web/Modules/Orchard.Localization/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.Localization/Module.txt @@ -5,9 +5,6 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: The localization module enables the localization of content items. -Features: - Orchard.Localization: - Name: Localization - Description: Localize content items. - Dependencies: Settings - Category: Content +FeatureDescription: Localize content items. +Dependencies: Settings +Category: Content diff --git a/src/Orchard.Web/Modules/Orchard.Media/Module.txt b/src/Orchard.Web/Modules/Orchard.Media/Module.txt index 8f98ba195..f22629e9c 100644 --- a/src/Orchard.Web/Modules/Orchard.Media/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.Media/Module.txt @@ -5,8 +5,5 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: The media module offer basic media management features. It currently only supports image files. Storage goes into the current Orchard file system, which can be the server's physical file system or Azure blob storage. -Features: - Orchard.Media: - Name: Media - Description: File system based media upload, storage and management. - Category: Media +FeatureDescription: File system based media upload, storage and management. +Category: Media diff --git a/src/Orchard.Web/Modules/Orchard.MediaPicker/Module.txt b/src/Orchard.Web/Modules/Orchard.MediaPicker/Module.txt index ce167e5a5..37dd0d319 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaPicker/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.MediaPicker/Module.txt @@ -5,9 +5,6 @@ Website: http://orchardproject.net Version: 1.0 OrchardVersion: 1.0 Description: Description for the module -Features: - Orchard.MediaPicker: - Name: MediaPicker - Dependencies: Orchard.Media, Orchard.jQuery - Description: UI for browsing for, uploading, or selecting an image for an HTML editor. - Category: Input Editor \ No newline at end of file +Dependencies: Orchard.Media, Orchard.jQuery +FeatureDescription: UI for browsing for, uploading, or selecting an image for an HTML editor. +Category: Input Editor \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Messaging/Module.txt b/src/Orchard.Web/Modules/Orchard.Messaging/Module.txt index 0efd4fdb5..5ed6e722b 100644 --- a/src/Orchard.Web/Modules/Orchard.Messaging/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.Messaging/Module.txt @@ -5,9 +5,6 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: The Messaging module adds messaging functionalities. -Features: - Orchard.Messaging: - Name: Messaging - Description: Messaging services. - Category: Messaging - Dependencies: Settings +FeatureDescription: Messaging services. +Category: Messaging +Dependencies: Settings diff --git a/src/Orchard.Web/Modules/Orchard.Migrations/Module.txt b/src/Orchard.Web/Modules/Orchard.Migrations/Module.txt index 57a167323..9d86c48c6 100644 --- a/src/Orchard.Web/Modules/Orchard.Migrations/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.Migrations/Module.txt @@ -5,11 +5,9 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: Data migration commands. +FeatureDescription: Data migration commands. +Category: Developer Features: - Orchard.Migrations: - Name: Migrations - Description: Data migration commands. - Category: Developer DatabaseUpdate: Name: Database Update Description: Commands for updating the database schema according to the definition of the "Record" classes in code. diff --git a/src/Orchard.Web/Modules/Orchard.Modules/Module.txt b/src/Orchard.Web/Modules/Orchard.Modules/Module.txt index 496292ff5..18a089136 100644 --- a/src/Orchard.Web/Modules/Orchard.Modules/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.Modules/Module.txt @@ -5,8 +5,5 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: The Modules module enables the administrator of the site to manage the installed modules as well as activate and de-activate features. -Features: - Orchard.Modules: - Name: Modules - Description: Standard module and feature management. - Category: Core +FeatureDescription: Standard module and feature management. +Category: Core diff --git a/src/Orchard.Web/Modules/Orchard.MultiTenancy/Module.txt b/src/Orchard.Web/Modules/Orchard.MultiTenancy/Module.txt index 3c65f14cf..041972a5d 100644 --- a/src/Orchard.Web/Modules/Orchard.MultiTenancy/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.MultiTenancy/Module.txt @@ -5,8 +5,5 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: The multi-tenancy module enables multiple Orchard sites to run in isolation inside of a single web application, improving site density on a single server or hosted account. -Features: - Orchard.MultiTenancy: - Name: Multi Tenancy - Description: Configure multiple site tenants. - Category: Hosting +FeatureDescription: Configure multiple site tenants. +Category: Hosting diff --git a/src/Orchard.Web/Modules/Orchard.Packaging/Module.txt b/src/Orchard.Web/Modules/Orchard.Packaging/Module.txt index 69c5b8adc..8ab5f5e60 100644 --- a/src/Orchard.Web/Modules/Orchard.Packaging/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.Packaging/Module.txt @@ -5,16 +5,14 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: The packaging module enables packaging modules using the OPC format. +FeatureDescription: Commands for creating/installing local modules. +Category: Packaging +Dependencies: PackagingServices Features: PackagingServices: Name: Packaging Services Description: Core services for packaging using the OPC format. Category: Packaging - Orchard.Packaging: - Name: Packaging - Description: Commands for creating/installing local modules. - Category: Packaging - Dependencies: PackagingServices Gallery: Name: Gallery Description: Module gallery management. diff --git a/src/Orchard.Web/Modules/Orchard.Pages/Module.txt b/src/Orchard.Web/Modules/Orchard.Pages/Module.txt index 4b2bb1a29..7bf03f419 100644 --- a/src/Orchard.Web/Modules/Orchard.Pages/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.Pages/Module.txt @@ -5,9 +5,6 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: Introduces a preconfigured page content type. -Features: - Orchard.Pages: - Name: Pages - Description: A basic page content type. - Dependencies: Contents - Category: Content +FeatureDescription: A basic page content type. +Dependencies: Contents +Category: Content diff --git a/src/Orchard.Web/Modules/Orchard.PublishLater/Module.txt b/src/Orchard.Web/Modules/Orchard.PublishLater/Module.txt index 7544fcf63..ac4617346 100644 --- a/src/Orchard.Web/Modules/Orchard.PublishLater/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.PublishLater/Module.txt @@ -5,9 +5,6 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: The PublishLater module introduces draft creation and scheduled publishing functionality. -Features: - Orchard.PublishLater: - Name: Publish Later - Description: Draft creation and scheduled publishing. - Category: Content - Dependencies: Common, Scheduling, Orchard.jQuery +FeatureDescription: Draft creation and scheduled publishing. +Category: Content +Dependencies: Common, Scheduling, Orchard.jQuery diff --git a/src/Orchard.Web/Modules/Orchard.Recipes/Module.txt b/src/Orchard.Web/Modules/Orchard.Recipes/Module.txt index c889105c1..97aeec56b 100644 --- a/src/Orchard.Web/Modules/Orchard.Recipes/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.Recipes/Module.txt @@ -5,8 +5,5 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: Provides Orchard Recipes. -Features: - Orchard.Recipes: - Name: Recipes - Description: Implementation of Orchard recipes. - Category: Core +FeatureDescription: Implementation of Orchard recipes. +Category: Core diff --git a/src/Orchard.Web/Modules/Orchard.Roles/Module.txt b/src/Orchard.Web/Modules/Orchard.Roles/Module.txt index 6f2fe9bb6..d64045cb4 100644 --- a/src/Orchard.Web/Modules/Orchard.Roles/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.Roles/Module.txt @@ -5,9 +5,6 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: The roles module is adding the ability to assign roles to users. It's also providing a set of default roles for which other modules can define default permissions. -Features: - Orchard.Roles: - Name: Roles - Description: Standard user roles. - Category: Core - Dependencies: Orchard.Users +FeatureDescription: Standard user roles. +Category: Core +Dependencies: Orchard.Users diff --git a/src/Orchard.Web/Modules/Orchard.Scripting.Dlr/Module.txt b/src/Orchard.Web/Modules/Orchard.Scripting.Dlr/Module.txt index a733c42d0..88b71a3d3 100644 --- a/src/Orchard.Web/Modules/Orchard.Scripting.Dlr/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.Scripting.Dlr/Module.txt @@ -5,9 +5,6 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: The DLR scripting module enables the possibility to execute scripts using the DLR. -Features: - Orchard.Scripting.Dlr: - Name: DLR Scripting - Description: DLR scripting support. - Dependencies: Orchard.Scripting - Category: Scripting +FeatureDescription: DLR scripting support. +Dependencies: Orchard.Scripting +Category: Scripting diff --git a/src/Orchard.Web/Modules/Orchard.Scripting/Module.txt b/src/Orchard.Web/Modules/Orchard.Scripting/Module.txt index aef1f0268..c8a7f6ad2 100644 --- a/src/Orchard.Web/Modules/Orchard.Scripting/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.Scripting/Module.txt @@ -5,11 +5,9 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: The scripting module enables the possibility to execute scripts using a simple custom scripting language. +FeatureDescription: Scripting support. +Category: Scripting Features: - Orchard.Scripting: - Name: Scripting - Description: Scripting support. - Category: Scripting Orchard.Scripting.Lightweight: Name: Lightweight scripting Description: Custom lightweight and simple scripting language. diff --git a/src/Orchard.Web/Modules/Orchard.Search/Module.txt b/src/Orchard.Web/Modules/Orchard.Search/Module.txt index b2bdf7b77..466957a09 100644 --- a/src/Orchard.Web/Modules/Orchard.Search/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.Search/Module.txt @@ -5,9 +5,6 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: The search module enables the management of the search index and provides the front-end searching user interface. -Features: - Orchard.Search: - Name: Search - Description: Standard interface to Orchard's built-in search. - Category: Search - Dependencies: Orchard.Indexing +FeatureDescription: Standard interface to Orchard's built-in search. +Category: Search +Dependencies: Orchard.Indexing diff --git a/src/Orchard.Web/Modules/Orchard.Setup/Module.txt b/src/Orchard.Web/Modules/Orchard.Setup/Module.txt index fa3a4b592..5e50f4060 100644 --- a/src/Orchard.Web/Modules/Orchard.Setup/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.Setup/Module.txt @@ -4,8 +4,5 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: The setup module is creating the application's setup experience. -Features: - Orchard.Setup: - Name: Setup - Description: Standard site setup. This feature is disabled automatically once setup is over. - Category: Core \ No newline at end of file +FeatureDescription: Standard site setup. This feature is disabled automatically once setup is over. +Category: Core \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Tags/Module.txt b/src/Orchard.Web/Modules/Orchard.Tags/Module.txt index 8835db270..7e24cc2d5 100644 --- a/src/Orchard.Web/Modules/Orchard.Tags/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.Tags/Module.txt @@ -5,9 +5,6 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: The tags module is providing basic tagging for arbitrary content types. -Features: - Orchard.Tags: - Name: Tags - Description: Tag a content item. - Dependencies: Settings - Category: Navigation +FeatureDescription: Tag a content item. +Dependencies: Settings +Category: Navigation diff --git a/src/Orchard.Web/Modules/Orchard.Themes/Module.txt b/src/Orchard.Web/Modules/Orchard.Themes/Module.txt index bce336892..0aee0a9ce 100644 --- a/src/Orchard.Web/Modules/Orchard.Themes/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.Themes/Module.txt @@ -5,8 +5,5 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: The themes module makes it possible for Orchard applications to customize the look and feel of an Orchard web site. -Features: - Orchard.Themes: - Name: Themes - Description: Basic theming capability. - Category: Core +FeatureDescription: Basic theming capability. +Category: Core diff --git a/src/Orchard.Web/Modules/Orchard.Users/Module.txt b/src/Orchard.Web/Modules/Orchard.Users/Module.txt index 098ffcb45..e4dae2357 100644 --- a/src/Orchard.Web/Modules/Orchard.Users/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.Users/Module.txt @@ -5,9 +5,6 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: The users module enables user management. -Features: - Orchard.Users: - Name: Users - Description: Standard users. - Category: Core - Dependencies: Settings +FeatureDescription: Standard users. +Category: Core +Dependencies: Settings diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/Module.txt b/src/Orchard.Web/Modules/Orchard.Widgets/Module.txt index 1e97c0ced..6530ca2f5 100644 --- a/src/Orchard.Web/Modules/Orchard.Widgets/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.Widgets/Module.txt @@ -5,9 +5,6 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: An implementation of widgets for Orchard. -Features: - Orchard.Widgets: - Name: Widgets - Description: An implementation of widgets. - Category: Widget - Dependencies: Orchard.Scripting +FeatureDescription: An implementation of widgets. +Category: Widget +Dependencies: Orchard.Scripting diff --git a/src/Orchard.Web/Modules/Orchard.jQuery/Module.txt b/src/Orchard.Web/Modules/Orchard.jQuery/Module.txt index 1fb01f49e..38f903ff1 100644 --- a/src/Orchard.Web/Modules/Orchard.jQuery/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.jQuery/Module.txt @@ -5,8 +5,5 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: The jQuery module contains the jQuery and related script libraries. -Features: - Orchard.jQuery: - Name: jQuery - Description: A common location for jQuery and related script libraries. - Category: Core +FeatureDescription: A common location for jQuery and related script libraries. +Category: Core diff --git a/src/Orchard.Web/Modules/TinyMce/Module.txt b/src/Orchard.Web/Modules/TinyMce/Module.txt index 7f08da456..f5f034565 100644 --- a/src/Orchard.Web/Modules/TinyMce/Module.txt +++ b/src/Orchard.Web/Modules/TinyMce/Module.txt @@ -5,8 +5,5 @@ Website: http://orchardproject.net Version: 1.0.20 OrchardVersion: 1.0.20 Description: The TinyMCE module enables rich text contents to be created using a "What You See Is What You Get" user interface. -Features: - TinyMce: - Name: TinyMce - Description: TinyMCE HTML WYSIWYG editor. - Category: Input Editor +FeatureDescription: TinyMCE HTML WYSIWYG editor. +Category: Input Editor diff --git a/src/Orchard/Environment/Extensions/Folders/ExtensionFolders.cs b/src/Orchard/Environment/Extensions/Folders/ExtensionFolders.cs index e1e6c3211..2392b0c6f 100644 --- a/src/Orchard/Environment/Extensions/Folders/ExtensionFolders.cs +++ b/src/Orchard/Environment/Extensions/Folders/ExtensionFolders.cs @@ -101,7 +101,7 @@ namespace Orchard.Environment.Extensions.Folders { Zones = GetValue(manifest, "Zones"), BaseTheme = GetValue(manifest, "BaseTheme"), }; - extensionDescriptor.Features = GetFeaturesForExtension(GetValue(manifest, "Features"), extensionDescriptor); + extensionDescriptor.Features = GetFeaturesForExtension(manifest, extensionDescriptor); return extensionDescriptor; } @@ -174,6 +174,15 @@ namespace Orchard.Environment.Extensions.Folders { case "BaseTheme": manifest.Add("BaseTheme", field[1]); break; + case "Dependencies": + manifest.Add("Dependencies", field[1]); + break; + case "Category": + manifest.Add("Category", field[1]); + break; + case "FeatureDescription": + manifest.Add("FeatureDescription", field[1]); + break; case "Features": manifest.Add("Features", reader.ReadToEnd()); break; @@ -184,8 +193,23 @@ namespace Orchard.Environment.Extensions.Folders { return manifest; } - private static IEnumerable GetFeaturesForExtension(string featuresText, ExtensionDescriptor extensionDescriptor) { + private static IEnumerable GetFeaturesForExtension(IDictionary manifest, ExtensionDescriptor extensionDescriptor) { var featureDescriptors = new List(); + + // Default feature + FeatureDescriptor defaultFeature = new FeatureDescriptor { + Id = extensionDescriptor.Id, + Name = extensionDescriptor.Name, + Description = GetValue(manifest, "FeatureDescription") ?? GetValue(manifest, "Description") ?? string.Empty, + Dependencies = ParseFeatureDependenciesEntry(GetValue(manifest, "Dependencies")), + Extension = extensionDescriptor, + Category = GetValue(manifest, "Category") + }; + + featureDescriptors.Add(defaultFeature); + + // Remaining features + string featuresText = GetValue(manifest, "Features"); if (featuresText != null) { FeatureDescriptor featureDescriptor = null; using (StringReader reader = new StringReader(featuresText)) { @@ -193,17 +217,25 @@ namespace Orchard.Environment.Extensions.Folders { while ((line = reader.ReadLine()) != null) { if (IsFeatureDeclaration(line)) { if (featureDescriptor != null) { - featureDescriptors.Add(featureDescriptor); + if (!featureDescriptor.Equals(defaultFeature)) { + featureDescriptors.Add(featureDescriptor); + } + featureDescriptor = null; } - featureDescriptor = new FeatureDescriptor { - Extension = extensionDescriptor - }; + string[] featureDeclaration = line.Split(new[] { ":" }, StringSplitOptions.RemoveEmptyEntries); - featureDescriptor.Id = featureDeclaration[0].Trim(); - if (featureDescriptor.Id == extensionDescriptor.Id) { + string featureDescriptorId = featureDeclaration[0].Trim(); + if (featureDescriptorId == extensionDescriptor.Id) { + featureDescriptor = defaultFeature; featureDescriptor.Name = extensionDescriptor.Name; } + else { + featureDescriptor = new FeatureDescriptor { + Id = featureDescriptorId, + Extension = extensionDescriptor + }; + } } else if (IsFeatureFieldDeclaration(line)) { if (featureDescriptor != null) { @@ -239,20 +271,12 @@ namespace Orchard.Environment.Extensions.Folders { throw new ArgumentException(message); } } - if (featureDescriptor != null) + + if (featureDescriptor != null && !featureDescriptor.Equals(defaultFeature)) featureDescriptors.Add(featureDescriptor); } } - if (!featureDescriptors.Any(fd => fd.Id == extensionDescriptor.Id)) { - featureDescriptors.Add(new FeatureDescriptor { - Id = extensionDescriptor.Id, - Name = extensionDescriptor.Name, - Dependencies = new string[0], - Extension = extensionDescriptor - }); - } - return featureDescriptors; } @@ -277,12 +301,15 @@ namespace Orchard.Environment.Extensions.Folders { return false; } - private static string[] ParseFeatureDependenciesEntry(string dependenciesEntry) { + private static IEnumerable ParseFeatureDependenciesEntry(string dependenciesEntry) { + if (string.IsNullOrEmpty(dependenciesEntry)) + return Enumerable.Empty(); + var dependencies = new List(); foreach (var s in dependenciesEntry.Split(',')) { dependencies.Add(s.Trim()); } - return dependencies.ToArray(); + return dependencies; } private static string GetValue(IDictionary fields, string key) {