circular dependency

  • Thread starter Rimma Meital via .NET 247
  • Start date
R

Rimma Meital via .NET 247

(Type your message here)

--------------------------------
From: Rimma Meital
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!!!!!
 
B

Bob Powell [MVP]

The classic solution would be to create interfaces for the functionality you
require in a third DLL and have both objects refer to that rather than
each-other.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm

The GDI+ FAQ RSS feed: http://www.bobpowell.net/faqfeed.xml
Windows Forms Tips and Tricks RSS: http://www.bobpowell.net/tipstricks.xml
Bob's Blog: http://bobpowelldotnet.blogspot.com/atom.xml






Rimma Meital via .NET 247 said:
(Type your message here)
object (writes to logger) and application_management object (stores paths
and other things, reads ini file of the application).
 

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

Top