I'm using .Net remoting to set up a bidirectional communication line between two objects. The basic structure is as follows:
Instances of RemoteObjectA call methods on StaticObjectA.
Instances of RemoteObjectB call methods on StaticObjectB.
StaticObjectA needs to be able to call methods provided by RemoteObjectB.
StaticObjectB needs to be able to call methods provided by RemoteObjectA.
The problem with this setup is the circular reference in RemoteObjectA gets StaticObjectA gets RemoteObjectB gets StaticObjectB gets RemoteObjectA...
I implemented an interface IRemoteObjectA and IRemoteObjectB and had the remote objects inheret from their respective interfaces, but then setting up the remoting fails.
If the solution to this problem is: "don't use remoting", I can deal with that. Just wanted to make sure I wasn't missing a simple solution.