From e226ab586e69b66b40fbf6c4aeaaf9f7f25de441 Mon Sep 17 00:00:00 2001 From: Sem van der Hoeven Date: Wed, 14 Oct 2020 15:27:35 +0200 Subject: [PATCH] added message method to dataparser --- Hashing/DataParser.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Hashing/DataParser.cs b/Hashing/DataParser.cs index 1ba0581..b4b3be5 100644 --- a/Hashing/DataParser.cs +++ b/Hashing/DataParser.cs @@ -40,6 +40,19 @@ namespace Util return Encoding.ASCII.GetBytes(JsonConvert.SerializeObject(json)); } + public static byte[] GetMessageToSend(string messageToSend) + { + dynamic json = new + { + identifier = MESSAGE, + data = new + { + message = messageToSend + } + }; + return Encoding.ASCII.GetBytes(JsonConvert.SerializeObject(json)); + } + public static byte[] LoginAsDoctor(string mUsername, string mPassword) { dynamic json = new