Hi,
In our project it is necessary to be able to save a map, all of its layers, the symbology, current extent, etc. I have had very good luck with this until I tried to serialize a MrSidRasterLayer. Then I get the following error:
Exception Source: mscorlib
Exception Type: System.Runtime.Serialization.SerializationException
Exception Message: Type 'MapSuiteGeoRaster.GeoImage' in Assembly 'MapSuiteGeoRasterX86, Version=1.0.3295.16750, Culture=neutral, PublicKeyToken=null' is not marked as serializable.
Exception Target Site: InternalGetSerializableMembers
---- Stack Trace ----
System.Runtime.Serialization.FormatterServices.InternalGetSerializableMembers(type As RuntimeType)
GeoFrame.EXE: N 9452985
System.Runtime.Serialization.FormatterServices.GetSerializableMembers(type As Type, context As StreamingContext)
GeoFrame.EXE: N 00247
System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitMemberInfo()
GeoFrame.EXE: N 00160
System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(obj As Object, surrogateSelector As ISurrogateSelector, context As StreamingContext, serObjectInfoInit As SerObjectInfoInit, converter As IFormatterConverter, objectWriter As ObjectWriter, binder As SerializationBinder)
GeoFrame.EXE: N 00218
System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Write(objectInfo As WriteObjectInfo, memberNameInfo As NameInfo, typeNameInfo As NameInfo)
GeoFrame.EXE: N 00388
System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(graph As Object, inHeaders As Header[], serWriter As __BinaryWriter, fCheck As Boolean)
GeoFrame.EXE: N 00444
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(serializationStream As Stream, graph As Object, headers As Header[], fCheck As Boolean)
GeoFrame.EXE: N 00133
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(serializationStream As Stream, graph As Object)
GeoFrame.EXE: N 00013
PluginUtilities.Common.SaveWorkingSet(oPlugin As IGeoPlugin, sCurrentFileName As String)
GeoFrame.EXE: N 00815
The RasterLayer base class and MrSidRasterLayer are both marked as serializable, according to the API documentation, however someting within the class is not.
Any chance this might work anytime soon?
Thanks!
Steve