inversion of control - Castle Windsor - Get all classes derived from base class -


sorry, new castle.windsor, may noob question.

i have following structure:

public class device { ... } public class sensor : device { ... } public class actuator : device { ... } 

i want query castle.windsor components inherit device...

how can achieve this?

thanks!

try this:

container.register(classes     .fromassemblycontaining<device>()        .basedon<device>()     .withservicebase()     .lifestyletransient()); 

Comments

Popular posts from this blog

javascript - addthis share facebook and google+ url -

java - Simulate the tossing of a coin three times and print out the percentage of cases in which one gets three tails -

c++ - Class declaration error at explicit keyword -