{"action":"created","issue":{"url":"https://api.github.com/repos/FubarDevelopment/QuickGraph/issues/106","repository_url":"https://api.github.com/repos/FubarDevelopment/QuickGraph","labels_url":"https://api.github.com/repos/FubarDevelopment/QuickGraph/issues/106/labels{/name}","comments_url":"https://api.github.com/repos/FubarDevelopment/QuickGraph/issues/106/comments","events_url":"https://api.github.com/repos/FubarDevelopment/QuickGraph/issues/106/events","html_url":"https://github.com/FubarDevelopment/QuickGraph/issues/106","id":331290489,"node_id":"MDU6SXNzdWUzMzEyOTA0ODk=","number":106,"title":"CP-18986: GraphML Serialization in Silverlight Runtime Error","user":{"login":"fubar-coder","id":4739844,"node_id":"MDQ6VXNlcjQ3Mzk4NDQ=","avatar_url":"https://avatars3.githubusercontent.com/u/4739844?v=4","gravatar_id":"","url":"https://api.github.com/users/fubar-coder","html_url":"https://github.com/fubar-coder","followers_url":"https://api.github.com/users/fubar-coder/followers","following_url":"https://api.github.com/users/fubar-coder/following{/other_user}","gists_url":"https://api.github.com/users/fubar-coder/gists{/gist_id}","starred_url":"https://api.github.com/users/fubar-coder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fubar-coder/subscriptions","organizations_url":"https://api.github.com/users/fubar-coder/orgs","repos_url":"https://api.github.com/users/fubar-coder/repos","events_url":"https://api.github.com/users/fubar-coder/events{/privacy}","received_events_url":"https://api.github.com/users/fubar-coder/received_events","type":"User","site_admin":false},"labels":[{"id":961517317,"node_id":"MDU6TGFiZWw5NjE1MTczMTc=","url":"https://api.github.com/repos/FubarDevelopment/QuickGraph/labels/priority:Low","name":"priority:Low","color":"ff9900","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-06-11T18:00:33Z","updated_at":"2018-06-12T11:09:15Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"*From unknown CodePlex user on Thursday, 21 October 2010 22:24:27*\r\n\r\nQuickGraph is bad ass! I may have found an error though... Anything thoughts are would be greatly appreciated Thanks!\n \n \nThe following code and XML works perfectly in .NET 4 but fails in Silverlight 4. The code will compile in SL4, but silently fails during run time.\n \n<?xml version=\"1.0\" encoding=\"utf-16\"?>\n<graphml xmlns=\"http://graphml.graphdrawing.org/xmlns\">\n  <graph id=\"G\" edgedefault=\"directed\" parse.nodes=\"2\" parse.edges=\"1\" parse.order=\"nodesfirst\" parse.nodeids=\"free\" parse.edgeids=\"free\">\n    <node id=\"vertex0\" />\n    <node id=\"vertex1\" />\n    <edge id=\"edge1\" source=\"vertex0\" target=\"vertex1\" />\n  </graph>\n</graphml>\n \nprivate string GraphToXml(FlockGraph graph)\n{\n    StringBuilder sb = new StringBuilder();\n \n    using (XmlWriter writer = XmlWriter.Create(sb))\n    {\n        var serializer = new GraphMLSerializer<FlockVertex, FlockEdge, FlockGraph>();\n        serializer.Serialize(writer, graph, v => v.ID, e => e.ID);\n        writer.Flush();\n    }\n \n    return sb.ToString();\n}\n \nprivate FlockGraph XmlToGraph(string XmlGraph)\n{\n    FlockGraph graph = new FlockGraph();\n \n    using (XmlReader reader = XmlReader.Create(new StringReader(XmlGraph)))\n    {\n        var serializer = new GraphMLDeserializer<FlockVertex, FlockEdge, FlockGraph>();\n \n        serializer.Deserialize(reader, graph,\n                                id => new FlockVertex(id),\n                                (source, target, id) => new FlockEdge(source, target));\n    }\n \n    return graph;\n}"},"comment":{"url":"https://api.github.com/repos/FubarDevelopment/QuickGraph/issues/comments/396552560","html_url":"https://github.com/FubarDevelopment/QuickGraph/issues/106#issuecomment-396552560","issue_url":"https://api.github.com/repos/FubarDevelopment/QuickGraph/issues/106","id":396552560,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NjU1MjU2MA==","user":{"login":"fubar-coder","id":4739844,"node_id":"MDQ6VXNlcjQ3Mzk4NDQ=","avatar_url":"https://avatars3.githubusercontent.com/u/4739844?v=4","gravatar_id":"","url":"https://api.github.com/users/fubar-coder","html_url":"https://github.com/fubar-coder","followers_url":"https://api.github.com/users/fubar-coder/followers","following_url":"https://api.github.com/users/fubar-coder/following{/other_user}","gists_url":"https://api.github.com/users/fubar-coder/gists{/gist_id}","starred_url":"https://api.github.com/users/fubar-coder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fubar-coder/subscriptions","organizations_url":"https://api.github.com/users/fubar-coder/orgs","repos_url":"https://api.github.com/users/fubar-coder/repos","events_url":"https://api.github.com/users/fubar-coder/events{/privacy}","received_events_url":"https://api.github.com/users/fubar-coder/received_events","type":"User","site_admin":false},"created_at":"2018-06-12T11:09:15Z","updated_at":"2018-06-12T11:09:15Z","author_association":"CONTRIBUTOR","body":"*Form unknown CodePlex user on Monday, 08 November 2010 03:05:06*\n\nI ended up writing a quick and dirty custom deserializer. I found one major difference in how SL differs from .NET as far XML; in SL you have to explicitly say “MoveToElement” when reading element content. In .NET you can just write GetConent or whatever the .NET method is called. \r\n...\r\nreader.MoveToElement();\r\n        XmlReader inner = reader.ReadSubtree();\r\n        while (inner.Read())\r\n        {\r\n        \tif (inner.Name == \"data\") //Custom Attributes\r\n               {\r\n               if (inner.HasAttributes)\r\n               {\r\n\twhile (inner.MoveToNextAttribute())\r\n                        {\r\n                        \tif (inner.Name == \"key\")\r\n                                {\r\n                                \tif (inner.Value == \"Name\")\r\n                                        {\r\n                                        \tinner.MoveToElement(); // <<<---- Explicitly Move Reader In SL\r\n                                                name = inner.ReadElementContentAsString();\r\n                                        }\r\n...\r\n\r\npelikhan, \r\nI saw that you where working on the BronKerboshMaximumCliqueAlgorithm class, do you have a ball park ETA on that? \r\n"}}
{"actor":{"display_login":"fubar-coder"}}