public void Read(XmlReader xmlReader) { xmlReader.ReadToFollowing("Neighbour"); var nid = this.factory.CreateId(); nid.Deserialize(xmlReader, null); var remoteNode = factory.CreateRemoteNode(nid); // HACK: direction might be important. :( this.Edge = (IMatchEdge)this.node.ConnectTo(remoteNode, EdgeDirection.Both); this.Edge.Id.Deserialize(xmlReader, null); bool remote = xmlReader.ReadElementContentAsBoolean(); if (remote) { this.Edge.RemotePartitionId = factory.CreateId(); this.Edge.RemotePartitionId.Deserialize(xmlReader, null); } }