Skip to content

Beginner Question about implementing viewmodels #53

Discussion options

You must be logged in to vote

I didn't quite understand the question about composition roots. Let me tell you a little bit why composition roots are very important in Pure.DI and not so important in classic DI containers.

If you use classic DI containers, the composition is created dynamically every time you call a method similar to T Resolve<T>() or object GetService(Type type). The root of the composition there is simply the root type of the composition of objects in memory T or Type type. There can be as many of these as you like.

In the case of Pure.DI, the number of composition roots is limited because for each composition root a separate property or method is created at compile time. Therefore, each root is defi…

Replies: 3 comments 8 replies

Comment options

You must be logged in to vote
2 replies
@AlexanderBlackman
Comment options

@NikolayPianikov
Comment options

Comment options

You must be logged in to vote
6 replies
@NikolayPianikov
Comment options

Answer selected by AlexanderBlackman
@NikolayPianikov
Comment options

@AlexanderBlackman
Comment options

@NikolayPianikov
Comment options

@NikolayPianikov
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants