#19640 Adding Name to ImageProfilePart Import/Export

--HG--
branch : 1.x
extra : source : 759d2055497c2c20741a8cefe66401217b171cba
This commit is contained in:
StanleyGoldman
2013-04-23 17:15:20 -04:00
parent 7ed1eee5a9
commit 637e358d6a

View File

@@ -69,6 +69,7 @@ namespace Orchard.MediaProcessing.Drivers {
protected override void Exporting(ImageProfilePart part, ExportContentContext context) {
var element = context.Element(part.PartDefinition.Name);
element.Add(
new XAttribute("Name", part.Name),
new XElement("Filters",
part.Filters.Select(filter =>
new XElement("Filter",
@@ -86,6 +87,8 @@ namespace Orchard.MediaProcessing.Drivers {
protected override void Importing(ImageProfilePart part, ImportContentContext context) {
var element = context.Data.Element(part.PartDefinition.Name);
part.Name = element.Attribute("Name").Value;
var filterRecords = element.Element("Filters").Elements("Filter").Select(filter => new FilterRecord {
Description = filter.Attribute("Description").Value,
Category = filter.Attribute("Category").Value,