[mapguide-users] Suggested approach to consume EnumerateResources (C#)
diordonezr
diordonezr at hotmail.com
Fri Feb 7 06:18:16 PST 2020
Wonderful..
It works neatly, thanks for your help
// Assuming $resourceService has already been initialized.
MgResourceIdentifier mgResourceID = new
MgResourceIdentifier("Library://");
MgByteReader mgByteReader =
resourceService.EnumerateResources(mgResourceID, -1, string.Empty);
string echoBbyteReader = mgByteReader.ToString();
// Create an instance of the XmlSerializer.
XmlSerializer serializer =
new
XmlSerializer(typeof(OSGeo.MapGuide.ObjectModels.Common.ResourceList));
using (XmlReader reader = XmlReader.Create(new
StringReader(echoBbyteReader)))
{
OSGeo.MapGuide.ObjectModels.Common.ResourceList resData;
// Call the Deserialize method to restore the object's
state.
resData =
(OSGeo.MapGuide.ObjectModels.Common.ResourceList)serializer.Deserialize(reader);
}
--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
More information about the mapguide-users
mailing list