public static ModelInfoReqResponses.GetGraphDataResponse dispatch( VersionedModelClassNS.VersionedModelClass versionedModel, JObject jobj ) { var modelContainer = versionedModel.getCurrent(); ResponseJson.GraphData graphData = ModelUtilsNS.ModelUtils.getResponseJsonData(modelContainer); ModelInfoReqResponses.GetGraphDataResponse response = new ModelInfoReqResponses.GetGraphDataResponse(graphData); return(response); }
public static ResponseJson.GraphData getResponseJsonData(NetworkContainersNS.Graph graph) { ResponseJson.GraphData responseJsonData = new ResponseJson.GraphData { vertices = new Dictionary <string, ResponseJson.VertexData>(), edges = new Dictionary <string, ResponseJson.EdgeData>() }; foreach (KeyValuePair <string, NetworkContainersNS.Vertex> vtxEntry in graph.vertices) { responseJsonData.vertices[vtxEntry.Key] = GraphUtils.getVertexJsonData(vtxEntry.Value); } foreach (KeyValuePair <string, NetworkContainersNS.Edge> edgeEntry in graph.edges) { responseJsonData.edges[edgeEntry.Key] = GraphUtils.getEdgeJsonData(edgeEntry.Value); } return(responseJsonData); }
public GetGraphDataResponse(ResponseJson.GraphData data) { this.data = data; }
public static void notifyDataChanged(ResponseJson.GraphData data) { DataChangedNotification notif = new DataChangedNotification(data); System.Console.WriteLine(JsonConvert.SerializeObject(notif)); }
public DataChangedNotification(ResponseJson.GraphData data) { this.newGraphData = data; }