rename program to message
This commit is contained in:
@@ -1,34 +0,0 @@
|
|||||||
using Newtonsoft.Json;
|
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace Message
|
|
||||||
{
|
|
||||||
public class Message
|
|
||||||
{
|
|
||||||
public string Identifier
|
|
||||||
{
|
|
||||||
get;set;
|
|
||||||
}
|
|
||||||
|
|
||||||
public string Payload
|
|
||||||
{
|
|
||||||
get;set;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Message(string identifier, string payload)
|
|
||||||
{
|
|
||||||
this.Identifier = identifier;
|
|
||||||
this.Payload = payload;
|
|
||||||
}
|
|
||||||
|
|
||||||
public string Serialize()
|
|
||||||
{
|
|
||||||
return JsonConvert.SerializeObject(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Message Deserialize(string json)
|
|
||||||
{
|
|
||||||
return (Message)JsonConvert.DeserializeObject(json);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user