castle-windsor

Castle Windsor Dependency Resolver for MVC 3

心已入冬 提交于 2019-11-26 12:58:43
问题 Since the IoC/DI implementation in MVC 3 is most likely in its final form in the RC, I\'m looking for an updated implementation of the DependencyResolver, IControllerActivator and IViewPageActivator using Caste Windsor. Are there any examples out there that have been updated for MVC 3 RC? EDIT #1 Implementing a Windsor dependency resolver is indeed trivial, but there\'s still something missing. Contrary to Jeff Putz\'s Ninject example (below), it appears that it\'s not as simple as that with

Usage of IoC Containers; specifically Windsor

我怕爱的太早我们不能终老 提交于 2019-11-26 12:25:56
问题 I think the answer to this question is so obivous that noone has bothered writing about this, but its late and I really can\'t get my head around this. I\'ve been reading into IoC containers (Windsor in this case) and I\'m missing how you talk to the container from the various parts of your code. I get DI, I\'ve been doing poor mans DI (empty constructors calling overloaded injection constructors with default parameter implementations) for some time and I can completely see the benefit of the

Which Dependency Injection Tool Should I Use? [closed]

China☆狼群 提交于 2019-11-26 10:10:46
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . I am thinking about using Microsoft Unity for my Dependency Injection tool in our User Interface. Our Middle Tier already uses Castle

Comparing Castle Windsor, Unity and StructureMap

孤者浪人 提交于 2019-11-26 10:09:54
问题 In a follow up to Krzysztof’s statement that Windsor does a lot more than other IoC’s, I wanted to understand how these IoC’s stack up against each other and the benefits/additional facilities that castle Windsor provides. Are there any comparisons? Can someone help me understand the additional features that Castle Windsor provides over other IoC’s 回答1: See here and here for a pretty thorough technical comparison of several IoC containers, although somewhat outdated by now (they're from

Design - Where should objects be registered when using Windsor [closed]

走远了吗. 提交于 2019-11-26 01:37:25
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 12 months ago . I will have the following components in my application DataAccess DataAccess.Test Business Business.Test Application I was hoping to use Castle Windsor as IoC to glue the layers together but I am bit uncertain about the design of the gluing. My question is who should be

Windsor - pulling Transient objects from the container

本秂侑毒 提交于 2019-11-25 23:24:28
问题 How can I pull objects from the container that are transient in nature? Do I have to register them with the container and inject in the constructor of the needing class? Injecting everything into the constructor doesn\'t feel good. Also just for one class I don\'t want to create a TypedFactory and inject the factory into the needing class. Another thought that came to me was \"new\" them up on need basis. But I am also injecting a Logger component (through property) into all my classes. So if

Ioc/DI - Why do I have to reference all layers/assemblies in application's entry point?

♀尐吖头ヾ 提交于 2019-11-25 22:15:59
问题 (Related to this question, EF4: Why does proxy creation have to be enabled when lazy loading is enabled?). I\'m new to DI, so bear with me. I understand that the container is in charge of instantiating all of my registered types but in order to do so it requires a reference to all of the DLLs in my solution and their references. If I weren\'t using a DI container, I wouldn\'t have to reference the EntityFramework library in my MVC3 app, only my business layer, which would reference my DAL