Richard Danen пре 10 година
родитељ
комит
641faf9352

+ 37 - 0
Proftaak Remote Healthcare/FietsClientV2/CurrentData.cs

@@ -0,0 +1,37 @@
+using FietsClient.JSONObjecten;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace FietsClient
+{
+    class CurrentData
+    {
+        private string userID;
+        private List<Session> testResult;
+
+
+        public CurrentData(string id)
+        {
+            this.userID = id;
+            testResult = new List<Session>();
+        }
+
+        public void setSessionList(List<Session> tests)
+        {
+            testResult = tests;
+        }
+
+        public List<Session> GetSessions()
+        {
+            return testResult;
+        }
+
+        public void setSession(Session s)
+        {
+            testResult.Add(s);
+        }
+    }
+}

+ 18 - 0
Proftaak Remote Healthcare/FietsClientV2/lib/JsonConverter.cs

@@ -0,0 +1,18 @@
+using FietsClient.JSONObjecten;
+using Newtonsoft.Json;
+
+namespace FietsClient.lib
+{
+    class JsonConverter
+    {
+        public static string SerializeSession(Session s)
+        {
+            return JsonConvert.SerializeObject(s);
+        }
+
+        public static string SerializeLastMeasurement(Measurement measurement)
+        {
+            return JsonConvert.SerializeObject(measurement);
+        }
+    }
+}