Message cleanup

This commit is contained in:
Frank A. Krueger 2017-06-14 23:30:48 -07:00
parent 0683cf91ed
commit dfa658d075
2 changed files with 6 additions and 9 deletions

View File

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

View File

@ -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 ()
{