In my class there is an event to which external objects will be attached:
public event EventHandler<MessageReceivedEventArgs> MessageReceived;
However, an internal Listener that runs on its own thread will actually trigger an event.
private class Listener { public void Run() {
My tendency is to create an event with the same signature on the listener and subscribe to it in the main class in order to raise it to MessageReceived. This seems a bit cumbersome, so I was wondering if there is a neat / idiomatic way to forward such events.
marijne
source share