public void RemoveMessageHandler(MessageDataHandler onTrackMessage) { int index = listeners.IndexOf(onTrackMessage); if (index >= 0) { listeners.RemoveAt(index); messageTypes.RemoveAt(index); } }
public void AddMessageHandler(IMessageData messageType, MessageDataHandler action) { messageTypes.Add(messageType); listeners.Add(action); }