From 8f998da8a87e20f387bb47ac3287f09c41359592 Mon Sep 17 00:00:00 2001 From: "Frank A. Krueger" Date: Sun, 18 Jun 2017 23:42:13 -0700 Subject: [PATCH] Remove unused message id --- Ooui/Message.cs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/Ooui/Message.cs b/Ooui/Message.cs index b8d24af..a7fb9be 100644 --- a/Ooui/Message.cs +++ b/Ooui/Message.cs @@ -7,9 +7,6 @@ namespace Ooui { public class Message { - [JsonProperty("mid")] - public long Id = GenerateId (); - [JsonProperty("m")] public MessageType MessageType = MessageType.Nop; @@ -19,7 +16,7 @@ namespace Ooui [JsonProperty("k")] public string Key = ""; - [JsonProperty("v")] + [JsonProperty("v", NullValueHandling = NullValueHandling.Ignore)] public object Value = null; public static Message Call (string targetId, string method, params object[] args) => new Message { @@ -34,12 +31,6 @@ namespace Ooui TargetId = targetId, Key = eventType, }; - - static long idCounter = 0; - static long GenerateId () - { - return System.Threading.Interlocked.Increment (ref idCounter); - } } [JsonConverter (typeof (StringEnumConverter))]