G
Guest
ello everybody.
I have a class A that publishes an event, ands is using a delegate to allow
other objects to subscribe to it. After raising the event, class A is sending
some information wrapped up in the custom class deriving from EventArgs. When
the event fires, the class is then going through the list of subscribers
using the GetInvocationList() and is getting the response from the
subscribers.
So far so good.
The problem is when trying to subscribe to the event from a class B that has
no reference to class A.
It would be easy enough to add a reference to it and to just subscribe to
the event, however we do not want to make the server code to reference the
client classes.
Is there a way to do this differently? If not, that what about adding an
intermediary object that can receive and pass on the events raised in class A
on the client side, so that class B on the server needs only to reference one
object* But if there's a better way then I would really appreciate some
directions.
Thanks a lot.
I have a class A that publishes an event, ands is using a delegate to allow
other objects to subscribe to it. After raising the event, class A is sending
some information wrapped up in the custom class deriving from EventArgs. When
the event fires, the class is then going through the list of subscribers
using the GetInvocationList() and is getting the response from the
subscribers.
So far so good.
The problem is when trying to subscribe to the event from a class B that has
no reference to class A.
It would be easy enough to add a reference to it and to just subscribe to
the event, however we do not want to make the server code to reference the
client classes.
Is there a way to do this differently? If not, that what about adding an
intermediary object that can receive and pass on the events raised in class A
on the client side, so that class B on the server needs only to reference one
object* But if there's a better way then I would really appreciate some
directions.
Thanks a lot.