Click here to Skip to main content
15,896,527 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
AnswerRe: Unity in Modular App Pin
Pete O'Hanlon15-Feb-17 2:27
mvePete O'Hanlon15-Feb-17 2:27 
GeneralRe: Unity in Modular App Pin
aboubkr9015-Feb-17 2:47
professionalaboubkr9015-Feb-17 2:47 
GeneralRe: Unity in Modular App Pin
Pete O'Hanlon15-Feb-17 3:00
mvePete O'Hanlon15-Feb-17 3:00 
GeneralRe: Unity in Modular App Pin
aboubkr9015-Feb-17 3:18
professionalaboubkr9015-Feb-17 3:18 
GeneralRe: Unity in Modular App Pin
Pete O'Hanlon15-Feb-17 3:21
mvePete O'Hanlon15-Feb-17 3:21 
GeneralRe: Unity in Modular App Pin
aboubkr9015-Feb-17 3:43
professionalaboubkr9015-Feb-17 3:43 
GeneralRe: Unity in Modular App Pin
Pete O'Hanlon15-Feb-17 4:02
mvePete O'Hanlon15-Feb-17 4:02 
GeneralRe: Unity in Modular App Pin
aboubkr9015-Feb-17 4:25
professionalaboubkr9015-Feb-17 4:25 
In that setup the following code is possible:
C#
public class DefectiveModuel : IModule
{
    public DefectiveModuel(IUnityContainer container)
    {
        // trash the container
    }
}

The setup I'm going for is more like:
C#
public interface IModule
{
    void RegisterServices(IUnityContainer container);
    void Init(IUnityContainer container);
}
public class Manager
{
    public void Init(IUnityContainer root)
    {
        // Do something with the container
        Modules.Foreach(m => m.RegisterServices(root.CreateChildContainer()));
        Modules.Foreach(m => m.Init(root.Wrap()));
    }
}

So modules will only be able to configure there child container.
However, they will be able to use the root container to access services added by other modules on child containers under root.
The only way of discovering the limits of the possible is to venture a little way past them into the impossible.


modified 15-Feb-17 10:50am.

GeneralRe: Unity in Modular App Pin
Pete O'Hanlon15-Feb-17 5:03
mvePete O'Hanlon15-Feb-17 5:03 
GeneralRe: Unity in Modular App Pin
aboubkr9015-Feb-17 5:57
professionalaboubkr9015-Feb-17 5:57 
GeneralRe: Unity in Modular App Pin
Pete O'Hanlon15-Feb-17 7:46
mvePete O'Hanlon15-Feb-17 7:46 
GeneralRe: Unity in Modular App Pin
aboubkr9015-Feb-17 9:57
professionalaboubkr9015-Feb-17 9:57 
GeneralRe: Unity in Modular App Pin
aboubkr9015-Feb-17 3:43
professionalaboubkr9015-Feb-17 3:43 
GeneralRe: Unity in Modular App Pin
Eddy Vluggen15-Feb-17 6:52
professionalEddy Vluggen15-Feb-17 6:52 
GeneralRe: Unity in Modular App Pin
aboubkr9015-Feb-17 9:58
professionalaboubkr9015-Feb-17 9:58 
QuestionOLD Visual Studio Web Site Project need to modenise look and feel Pin
bromster14-Feb-17 3:53
bromster14-Feb-17 3:53 
AnswerRe: OLD Visual Studio Web Site Project need to modenise look and feel Pin
Richard Deeming14-Feb-17 4:49
mveRichard Deeming14-Feb-17 4:49 
QuestionHow do you problem solve? Pin
TheOnlyRealTodd6-Feb-17 10:42
professionalTheOnlyRealTodd6-Feb-17 10:42 
AnswerRe: How do you problem solve? Pin
Amar Vala10-Feb-17 2:36
Amar Vala10-Feb-17 2:36 
AnswerRe: How do you problem solve? Pin
Eddy Vluggen10-Feb-17 4:22
professionalEddy Vluggen10-Feb-17 4:22 
AnswerRe: How do you problem solve? Pin
Gerry Schmitz10-Feb-17 10:38
mveGerry Schmitz10-Feb-17 10:38 
QuestionSomething I use a lot Pin
Munchies_Matt18-Jan-17 10:26
Munchies_Matt18-Jan-17 10:26 
AnswerRe: Something I use a lot Pin
Richard Andrew x6421-Jan-17 5:44
professionalRichard Andrew x6421-Jan-17 5:44 
GeneralRe: Something I use a lot Pin
Munchies_Matt21-Jan-17 13:57
Munchies_Matt21-Jan-17 13:57 
JokeRe: Something I use a lot Pin
Brisingr Aerowing21-Jan-17 15:45
professionalBrisingr Aerowing21-Jan-17 15:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.