Message cleanup
This commit is contained in:
parent
0683cf91ed
commit
dfa658d075
|
@ -46,7 +46,11 @@ namespace Ooui
|
|||
handlers.Add (handler);
|
||||
|
||||
if (sendListen)
|
||||
Send (Message.Listen (Id, eventType));
|
||||
Send (new Message {
|
||||
MessageType = MessageType.Listen,
|
||||
TargetId = Id,
|
||||
Key = eventType,
|
||||
});
|
||||
}
|
||||
|
||||
public void RemoveEventListener (string eventType, EventHandler handler)
|
||||
|
|
|
@ -26,12 +26,6 @@ namespace Ooui
|
|||
set => v = FixupValue (value);
|
||||
}
|
||||
|
||||
public static Message Listen (string targetId, string eventType) => new Message {
|
||||
MessageType = MessageType.Listen,
|
||||
TargetId = targetId,
|
||||
Key = eventType,
|
||||
};
|
||||
|
||||
public static Message Event (string targetId, string eventType) => new Message {
|
||||
MessageType = MessageType.Event,
|
||||
TargetId = targetId,
|
||||
|
@ -53,7 +47,6 @@ namespace Ooui
|
|||
return v;
|
||||
}
|
||||
|
||||
|
||||
static long idCounter = 0;
|
||||
static long GenerateId ()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue