circular dependency

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have 2 DLLs (Class Libraries). Both defines single-ton objects - logger
object (writes to logger) and application_management object (stores paths and
other things, reads ini file of the application).
Both needs to refer to each other ->
application_management can write to a logger and
logger needs to know the path of logger file.

Of course, it's circular dependency problem.
Please help me to solve this problem!!!!!
 
Hi,

Put the common classes to third assembly that both assemblies will reference
(and this third doesn't reference any of them).
 
Write a wrapper object that refers to each object, or create an interface
that does not require actually referencing the object as an object (Like
remoting).

If you have architected correctly, I see no reason to have a circular
reference.


---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top