validation - How can I validate the configuration of windsor castle -


i want assert registrations valid, i.e no dependency missing , there no circular dependencies.
i'd in application (and not in unit-test) i'd able fail-fast if configuration invalid.
want accomplish without resolving (and instantiating) components - scanning dependency graph.
idea on how can that?

the motivation trial-and-error nature of configuring complex applications. i'd prefer fail-fast behavior in case of badly configured container.

btw - inspiration came automapper's assertconfigurationisvalid() method.

you can't 100% sure windsor dynamic organism , not can statically analyzed. handlers may in waitingdependency state yet app may 100% working since @ resolution time dependencies provided dynamicparameters, isubdependencyresolvers or ilazycomponentloaders.

there plans include functionality you've mentioned windsor, given above constraints, provide value.

i suggest having good, solid verifiable conventions decide goes container , not, , unit tests test container resolving components.

if don't mind getting false negatives can following:

var allhandlers = container.kernel.getassignablehandlers(typeof(object)); 

and iterate on them , check if valid, i'd rather have dedicated test that. take @ post example.

configuring application not have trial , error, nor should be. it's matter of conventions, , sticking them. have 2 posts may find useful:


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -