#17764: Core Shapes can't be overriden

Work Items: 17764

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2011-05-09 16:40:21 -07:00
parent 6cc4a3dc91
commit eddf71bcd1
3 changed files with 4 additions and 2 deletions

View File

@@ -45,7 +45,7 @@ namespace Orchard.DisplayManagement.Descriptors {
(descriptor, alteration) => {
alteration.Alter(descriptor);
return descriptor;
}));
})).ToList();
return new ShapeTable {
Descriptors = descriptors.ToDictionary(sd => sd.ShapeType, StringComparer.OrdinalIgnoreCase),

View File

@@ -55,6 +55,8 @@ namespace Orchard.DisplayManagement.Descriptors {
return target(displayContext);
}
};
// ShapeDescriptor.Bindings is a case insensitive dictionary
descriptor.Bindings[_bindingName] = binding;
});

View File

@@ -12,7 +12,7 @@ namespace Orchard.DisplayManagement.Descriptors {
Displaying = Enumerable.Empty<Action<ShapeDisplayingContext>>();
Displayed = Enumerable.Empty<Action<ShapeDisplayedContext>>();
Wrappers = new List<string>();
Bindings = new Dictionary<string, ShapeBinding>();
Bindings = new Dictionary<string, ShapeBinding>(StringComparer.OrdinalIgnoreCase);
Placement = ctx => new PlacementInfo {Location = DefaultPlacement};
}