Remove unused message id
This commit is contained in:
parent
a6f664ae8a
commit
8f998da8a8
|
@ -7,9 +7,6 @@ namespace Ooui
|
||||||
{
|
{
|
||||||
public class Message
|
public class Message
|
||||||
{
|
{
|
||||||
[JsonProperty("mid")]
|
|
||||||
public long Id = GenerateId ();
|
|
||||||
|
|
||||||
[JsonProperty("m")]
|
[JsonProperty("m")]
|
||||||
public MessageType MessageType = MessageType.Nop;
|
public MessageType MessageType = MessageType.Nop;
|
||||||
|
|
||||||
|
@ -19,7 +16,7 @@ namespace Ooui
|
||||||
[JsonProperty("k")]
|
[JsonProperty("k")]
|
||||||
public string Key = "";
|
public string Key = "";
|
||||||
|
|
||||||
[JsonProperty("v")]
|
[JsonProperty("v", NullValueHandling = NullValueHandling.Ignore)]
|
||||||
public object Value = null;
|
public object Value = null;
|
||||||
|
|
||||||
public static Message Call (string targetId, string method, params object[] args) => new Message {
|
public static Message Call (string targetId, string method, params object[] args) => new Message {
|
||||||
|
@ -34,12 +31,6 @@ namespace Ooui
|
||||||
TargetId = targetId,
|
TargetId = targetId,
|
||||||
Key = eventType,
|
Key = eventType,
|
||||||
};
|
};
|
||||||
|
|
||||||
static long idCounter = 0;
|
|
||||||
static long GenerateId ()
|
|
||||||
{
|
|
||||||
return System.Threading.Interlocked.Increment (ref idCounter);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[JsonConverter (typeof (StringEnumConverter))]
|
[JsonConverter (typeof (StringEnumConverter))]
|
||||||
|
|
Loading…
Reference in New Issue