View Single Post
Old 01-09-2009   #3 (permalink)
Jack Jackson


 
 

Re: Problem with circular references

On Fri, 9 Jan 2009 08:40:03 +0100, "don H. Lee" <nospam@xxxxxx> wrote:
Quote:

>Hi newsgroup
>
>I have a little problem in designing my assemblies.
>
>Following situation:
>
>1. I have 3 Assemblies: Assembly_A, Assembly_B and Assembly_C
>2. Assembly_A has a Collection of Assembly_C
>3. Assembly_B has as Collection of Assembly_C
>4. Assembly_C has a Object of Assembly_A and another one of Assembly_B
>
>So that's the situation and the situation must be like this (relationally)
>because Assembly_A and Assembly_B represent contractors and Assembly_C
>represents the contract. A contract is made between A and B.
>
>Both contractors can have n contracts. A contract has one A and one B.
>
>When trying to build this solution with team build the build process stops
>in case of circular references.
>It is logical, because A cannot be build until C is build and C cannot be
>build until A is build.
>
>Now my question. Is there a desing that don't destry the logic of the
>depencies between the assemblies but don't result in build errors.
>
>If not, what kind of design should I use for cases like this?
>
>Thanks for every suggestions and help!
>
>Best regards
>
>D.H. Lee
I would probably use and Interface to represent the contractors in C.
A and B would implement that Interface, which would be defined in a
fourth assembly that does not reference any of the others.
My System SpecsSystem Spec