[mapguide-commits] r7049 - trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Local
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Thu Sep 27 09:39:41 PDT 2012
Author: jng
Date: 2012-09-27 09:39:39 -0700 (Thu, 27 Sep 2012)
New Revision: 7049
Modified:
trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Local/LocalConnection.cs
Log:
Mental note
Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Local/LocalConnection.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Local/LocalConnection.cs 2012-09-27 12:46:35 UTC (rev 7048)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Local/LocalConnection.cs 2012-09-27 16:39:39 UTC (rev 7049)
@@ -355,6 +355,14 @@
public override void SetResourceData(string resourceid, string dataname, ResourceDataType datatype, System.IO.Stream stream, Utility.StreamCopyProgressDelegate callback)
{
+ //FIXME/BOGUS: We should be streaming this in! What if the resource data
+ //was several hundred MBs or 1-2 GBs in size? Hello System.OutOfMemoryException
+ //Other connection implementations are probably doing this too!
+ //
+ //BOGUS: Well we can't exactly plug in a System.IO.Stream to a MgByteSource
+ //either, and we can't extend SWIG proxy classes (not in the way it's currently set up anyways!).
+ //So the only feasible solution is offload the input stream to a temp file and then create
+ //an MgByteSource with the fileName ctor overload.
byte[] data = Utility.StreamAsArray(stream);
if (callback != null)
callback(0, data.Length, data.Length);
More information about the mapguide-commits
mailing list