diff --git a/src/Orchard.Tests/DisplayManagement/Descriptors/ShapeAttributeBindingStrategyTests.cs b/src/Orchard.Tests/DisplayManagement/Descriptors/ShapeAttributeBindingStrategyTests.cs index 7f3769cab..4048c76b6 100644 --- a/src/Orchard.Tests/DisplayManagement/Descriptors/ShapeAttributeBindingStrategyTests.cs +++ b/src/Orchard.Tests/DisplayManagement/Descriptors/ShapeAttributeBindingStrategyTests.cs @@ -45,7 +45,7 @@ namespace Orchard.Tests.DisplayManagement.Descriptors { } } - private IEnumerable GetInitializers() { + private IEnumerable GetInitializers() { var strategy = _container.Resolve(); var builder = new ShapeTableBuilder(); strategy.Discover(builder); diff --git a/src/Orchard/DisplayManagement/Descriptors/DefaultShapeTableManager.cs b/src/Orchard/DisplayManagement/Descriptors/DefaultShapeTableManager.cs index 1b9852300..0a98faf3e 100644 --- a/src/Orchard/DisplayManagement/Descriptors/DefaultShapeTableManager.cs +++ b/src/Orchard/DisplayManagement/Descriptors/DefaultShapeTableManager.cs @@ -36,7 +36,7 @@ namespace Orchard.DisplayManagement.Descriptors { }); } - static bool IsModuleOrRequestedTheme(ShapeDescriptorAlteration alteration, string themeName) { + static bool IsModuleOrRequestedTheme(ShapeAlteration alteration, string themeName) { if (alteration == null || alteration.Feature == null || alteration.Feature.Extension == null) { diff --git a/src/Orchard/DisplayManagement/Descriptors/ShapeDescriptorAlteration.cs b/src/Orchard/DisplayManagement/Descriptors/ShapeAlteration.cs similarity index 76% rename from src/Orchard/DisplayManagement/Descriptors/ShapeDescriptorAlteration.cs rename to src/Orchard/DisplayManagement/Descriptors/ShapeAlteration.cs index 9fae8822d..cbd5c76f9 100644 --- a/src/Orchard/DisplayManagement/Descriptors/ShapeDescriptorAlteration.cs +++ b/src/Orchard/DisplayManagement/Descriptors/ShapeAlteration.cs @@ -3,10 +3,10 @@ using System.Collections.Generic; using Orchard.Environment.Extensions.Models; namespace Orchard.DisplayManagement.Descriptors { - public class ShapeDescriptorAlteration { + public class ShapeAlteration { private readonly IList> _configurations; - public ShapeDescriptorAlteration(string shapeType, FeatureDescriptor feature, IList> configurations) { + public ShapeAlteration(string shapeType, FeatureDescriptor feature, IList> configurations) { _configurations = configurations; ShapeType = shapeType; Feature = feature; diff --git a/src/Orchard/DisplayManagement/Descriptors/ShapeDescriptorAlterationBuilder.cs b/src/Orchard/DisplayManagement/Descriptors/ShapeAlterationBuilder.cs similarity index 72% rename from src/Orchard/DisplayManagement/Descriptors/ShapeDescriptorAlterationBuilder.cs rename to src/Orchard/DisplayManagement/Descriptors/ShapeAlterationBuilder.cs index ca614908e..6f4f11e1d 100644 --- a/src/Orchard/DisplayManagement/Descriptors/ShapeDescriptorAlterationBuilder.cs +++ b/src/Orchard/DisplayManagement/Descriptors/ShapeAlterationBuilder.cs @@ -6,27 +6,27 @@ using Orchard.DisplayManagement.Implementation; using Orchard.Environment.Extensions.Models; namespace Orchard.DisplayManagement.Descriptors { - public class ShapeDescriptorAlterationBuilder { + public class ShapeAlterationBuilder { protected FeatureDescriptor _feature; protected string _shapeType; protected readonly IList> _configurations = new List>(); - public ShapeDescriptorAlterationBuilder Named(string shapeType) { + public ShapeAlterationBuilder Named(string shapeType) { _shapeType = shapeType; return this; } - public ShapeDescriptorAlterationBuilder From(FeatureDescriptor feature) { + public ShapeAlterationBuilder From(FeatureDescriptor feature) { _feature = feature; return this; } - public ShapeDescriptorAlterationBuilder Configure(Action action) { + public ShapeAlterationBuilder Configure(Action action) { _configurations.Add(action); return this; } - public ShapeDescriptorAlterationBuilder BoundAs(string bindingSource, Func> binder) { + public ShapeAlterationBuilder BoundAs(string bindingSource, Func> binder) { // schedule the configuration return Configure(descriptor => { @@ -47,14 +47,14 @@ namespace Orchard.DisplayManagement.Descriptors { }); } - public ShapeDescriptorAlterationBuilder OnCreating(Action action) { + public ShapeAlterationBuilder OnCreating(Action action) { return Configure(descriptor => { var existing = descriptor.Creating ?? Enumerable.Empty>(); descriptor.Creating = existing.Concat(new[] { action }); }); } - public ShapeDescriptorAlterationBuilder OnCreated(Action action) { + public ShapeAlterationBuilder OnCreated(Action action) { return Configure(descriptor => { var existing = descriptor.Created ?? Enumerable.Empty>(); descriptor.Created = existing.Concat(new[] { action }); diff --git a/src/Orchard/DisplayManagement/Descriptors/ShapeTableBuilder.cs b/src/Orchard/DisplayManagement/Descriptors/ShapeTableBuilder.cs index 6cc89dd0d..d4e6fb49c 100644 --- a/src/Orchard/DisplayManagement/Descriptors/ShapeTableBuilder.cs +++ b/src/Orchard/DisplayManagement/Descriptors/ShapeTableBuilder.cs @@ -3,23 +3,23 @@ using System.Linq; namespace Orchard.DisplayManagement.Descriptors { public class ShapeTableBuilder { - readonly IList _descriptorBuilders = new List(); + readonly IList _descriptorBuilders = new List(); - public ShapeDescriptorAlterationBuilder Describe { + public ShapeAlterationBuilder Describe { get { - var db = new ShapeDescriptorAlterationBuilderImpl(); + var db = new ShapeAlterationBuilderImpl(); _descriptorBuilders.Add(db); return db; } } - public IEnumerable Build() { + public IEnumerable Build() { return _descriptorBuilders.Select(b => b.Build()); } - class ShapeDescriptorAlterationBuilderImpl : ShapeDescriptorAlterationBuilder { - public ShapeDescriptorAlteration Build() { - return new ShapeDescriptorAlteration(_shapeType, _feature, _configurations.ToArray()); + class ShapeAlterationBuilderImpl : ShapeAlterationBuilder { + public ShapeAlteration Build() { + return new ShapeAlteration(_shapeType, _feature, _configurations.ToArray()); } } } diff --git a/src/Orchard/Orchard.Framework.csproj b/src/Orchard/Orchard.Framework.csproj index 0307c297b..0c8377dfb 100644 --- a/src/Orchard/Orchard.Framework.csproj +++ b/src/Orchard/Orchard.Framework.csproj @@ -141,8 +141,8 @@ - - + +