added message method to dataparser

This commit is contained in:
Sem van der Hoeven
2020-10-14 15:27:35 +02:00
parent ea4093ff75
commit e226ab586e

View File

@@ -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