46 lines
1.4 KiB
C#
46 lines
1.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using EHEC_Server;
|
|
using System.Web.Script.Serialization;
|
|
|
|
namespace EHEC_Server
|
|
{
|
|
public class ClusterConverter
|
|
{
|
|
protected string Json { get; set; }
|
|
public string WriteJson()
|
|
{
|
|
var Json = JsonConverter.Serialize(GetCluster());
|
|
//ClusterPatient p = new ClusterPatient();
|
|
//List<ClusterPatient> clusterPatientsList = new List<ClusterPatient>();
|
|
//clusterPatientsList = p.GetClusterPatients();
|
|
//ClusterResult r = new ClusterResult();
|
|
//List<ClusterResult> clusterResultsList = new List<ClusterResult>();
|
|
//clusterResultsList = r.GetClusterResults();
|
|
System.IO.File.WriteAllText(@"C: \Users\novski\Desktop\cluster.json", Json);
|
|
return Json; //= JsonConverter.Serialize(clusterPatientsList);
|
|
|
|
}
|
|
private Cluster GetCluster()
|
|
{
|
|
return new Cluster
|
|
{
|
|
Comment = "some comment",
|
|
Nodes = new List<Node>
|
|
{
|
|
new Node
|
|
{
|
|
Node get = new Node();
|
|
List <Node> xs = new List<Node>();
|
|
|
|
}
|
|
Nodes.add(getClusterPatients()) // irrgend sowas...
|
|
|
|
}
|
|
|
|
};
|
|
}
|
|
}
|
|
} |