[mapguide-commits] r7640 - branches/maestro-4.0.x/Maestro.Editors

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Tue Jun 25 04:22:06 PDT 2013


Author: jng
Date: 2013-06-25 04:22:06 -0700 (Tue, 25 Jun 2013)
New Revision: 7640

Modified:
   branches/maestro-4.0.x/Maestro.Editors/ResourceEditorServiceBase.cs
Log:
#2300: Fix XML content error when working with layers containing composite styles. The problem is due to the ResourceEditorServiceBase calling a naked IResource.Serialize() instead of going through ResourceTypeRegistry.Serialize(), which has the necessary pre-serialization hooks to clean out invalid content for things like inline SymbolDefinitions. A simple case of not RTFA(PI documentation), because the API docs for IResource.Serialize() clearly state this!

Modified: branches/maestro-4.0.x/Maestro.Editors/ResourceEditorServiceBase.cs
===================================================================
--- branches/maestro-4.0.x/Maestro.Editors/ResourceEditorServiceBase.cs	2013-06-25 11:14:41 UTC (rev 7639)
+++ branches/maestro-4.0.x/Maestro.Editors/ResourceEditorServiceBase.cs	2013-06-25 11:22:06 UTC (rev 7640)
@@ -434,7 +434,7 @@
         /// </summary>
         public void SyncSessionCopy()
         {
-            string xml = _editCopy.Serialize();
+            string xml = ResourceTypeRegistry.SerializeAsString(_editCopy);
             try
             {
                 using (var ms = new MemoryStream(Encoding.UTF8.GetBytes(xml)))



More information about the mapguide-commits mailing list