My class has an event which external objects will subscribe to:
public event EventHandler<MessageReceivedEventArgs> MessageReceived;
However, an internal Listener object, running on it's own thread, will actually be originating the event.
private class Listener
{
public void Run()
{
// events raised here which should be forwarded
// to parent's MessageReceived
}
};
My inclination 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 on MessageReceived. This seems a little cumbersome, so I was wondering if there is a neat/idiomatic way of forwarding events like this.