Hi
A solid, maintainable, and predictable way to communicate between dynamically loaded objects is via Interfaces.
For instance AAA could implement IAAA and BBB - IBBB. Or a shared common interface.
When AAA loads BBB it should get the IBBB interface:
If( assembly != null && assembly is IBBB)
{
IBBB oIBBB = assembly as IBBB
If( oIBBB != null )
{
oIBBB.SetIAAAProvider( this )
}
}
The implementation in BBB will be something like this:
private IAAA OIAAA { get
void IBBB.SetIAAAProvider ( object provider )
{
If( provider != null && provider is IAAA )
{
OIAAA = provider as IAAA
}
}
BBB can now access AAA via its IAAA interface using OIAAA.
Hope this helps.
Regards
TwinLane