473,383 Members | 1,984 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

circular dependency

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!!!!!

Jul 21 '05 #1
2 1347
Hi,

Put the common classes to third assembly that both assemblies will reference
(and this third doesn't reference any of them).

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

"brm004" <br****@discussions.microsoft.com> wrote in message
news:E4**********************************@microsof t.com...
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!!!!!

Jul 21 '05 #2
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!
***************************

"brm004" wrote:
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!!!!!

Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Evelyne | last post by:
On a server W2K, IIS5, I have many messages from ASP : cirdular dependency between types/modules. Which can be the origin of the problem? Example : Event Type: Warning Event Source: Active...
1
by: Henry Miller | last post by:
I have the following code (much simplified for this post). Note that SessionKey uses DataAccess, and DataAccess requires SessionKey in it's constructor. Public Class SessionKey Public...
2
by: ernesto basc?n pantoja | last post by:
Hi everybody: I'm implementing a general C++ framework and I have a basic question about circular dependencies: I am creating a base class Object, my Object class has a method defined as:...
4
by: ro86 | last post by:
Hello everyone! I am a newbie to C++ (~1 Week experience) and I have a few months of experience with object-oriented languages (Objective-C). I am currently working just for fun on a particle...
1
by: ChrisB | last post by:
Hello: I have created several components that have the following dependency relationships: Assembly1 references assemblies A, B, and C. Assembly2 references assemblies A, B When attempting...
4
by: Henke | last post by:
I have this scenario. public class A { public int numbers; public class A() { }
2
by: Rimma Meital via .NET 247 | last post by:
(Type your message here) -------------------------------- From: Rimma Meital I have 2 DLLs (Class Libraries). Both defines single-ton objects - logger object (writes to logger) and...
3
by: Rob Clark | last post by:
Hi, I have an issue which is the ordinary and always recurring circular dependency - but I do not know how to resolve it :-( The usual forward declaration does not help... I have a client...
7
by: barias | last post by:
Although circular dependencies are something developers should normally avoid, unfortunately they are very easy to create accidentally between classes in a VS project (i.e. circular compile-time...
3
by: donnyma | last post by:
I have a problem that looks like it has not been discussed before in these groups. I have a simple SQLAgent job that runs sp_who (could be anything, but let's just say sp_who for this example). ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.