Deserializing AdjacencyGraph

Nov 5, 2008 at 1:37 PM

I am trying to binary serialize and deserialize an adjacency graph and I am getting this error when deserializing:

"The constructor to deserialize an object of type 'QuickGraph.AdjacencyGraph`2+VertexEdgeDictionary[EjemploQuickGraph.Nodo,EjemploQuickGraph.Arco]' was not found."

  • All my classes are marked as Serializable.
  • I use the .NET 2.0 version of QuickGraph (unfortunately)
  • This is the piece of code I am using:
System.Runtime.Serialization.IFormatter formatter = new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter();
System.IO.MemoryStream ms = new System.IO.MemoryStream();
 formatter.Serialize(ms, grafo);

ms.Seek(0, System.IO.SeekOrigin.Begin);

object x = formatter.Deserialize(ms);
Where 'grafo' is the AdjacencyGraph.
Is it not implemented for .NET 2.0 version? Am I missing something on my code?

Thanks in advance
Nov 6, 2008 at 3:46 AM
I think only the BidirectionalGraph has been made serializable. Please open a workitem for this.