I'm trying to expose some events from a private object which is contained inside the object I am creating and it looks like the compiler is happy with this:
private WindowUpdateServer _windowUpdateServer;
public event WindowUpdateHandler WindowUpdated;
public RecieveWindowFramesManager() {
_windowUpdateServer = new WindowUpdateServer();
_windowUpdateServer.ExistingWindowUpdated += WindowUpdated; // ExistingWindowUpdated is a WindowUpdateHandler
}
But after RecieveWindowFramesManager is initialized _windowUpdateServer.ExistingWindowUpdated == null.
Am I missing something here - it seems this should work?
It is worth noting that after RecieveWindowFramesManager is initialized I attach an event listener to WindowUpdated but it never gets called (even though _windowUpdateServer.ExistingWindowUpdated gets fired).