how to implement IOC without a global static service?
        Posted  
        
            by Michel
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Michel
        
        
        
        Published on 2010-06-09T14:08:25Z
        Indexed on 
            2010/06/09
            14:12 UTC
        
        
        Read the original article
        Hit count: 424
        
Hi,
we want to use Unity for IOC. All i've seen is the implementation that there is one global static service which holds a reference to the Unity container, which registers all interface/class combinations and every class asks that object: give me an implementation for Ithis or IThat.
Frequently i see a response that this pattern is not good because it leads to a dependency from ALL classes to this service.
But what i don't see often, is: what is the alternative way?
Michel
© Stack Overflow or respective owner