Re: It it possible to redirect events?

Tech-Archive recommends: Fix windows errors by optimizing your registry



On Tue, 11 Dec 2007 12:56:22 -0800, Sin Jeong-hun <typingcat@xxxxxxxxx> wrote:

[...]
7.According to my oroginal scheme, everytime an ItHappened event fired
from an Item, A method in the Manager is called, which simply fires
its ItHappened events, thus redirecting it to the Client.
8.In 7, calling the method each time seemed like an overhead.

I think that given all of that, you might as well stick with the existing design, in which your Manager has its own event that clients subscribe to, and which it raises when its own handler subscribed to the Item's event is executed.

Nicholas and I have both provided alternatives, but I think that in either of our suggestions, implementing the suggestion needlessly complicates the implementation. What you've got right now is simple and maintainable and has no excessive performance overhead.

I'm glad we could answer your question, but I think you didn't really need us. :)

Pete
.