castle-windsor Questions

2

I have 2 implementations of the same interface and want to use implementation1 if the user is logged in or implementation2 if the user is not logged in. How can I configure this with castle windsor...
Fibrilliform asked 21/9, 2011 at 15:0

2

Solved

I have an asp.net process which also consumes messages from a servicebus (MassTransit). For webrequests my database session is resolved with a PerWebRequest lifestyle. But when the process consume...
Shebat asked 26/8, 2011 at 11:6

3

Solved

I've been experimenting with using named delegates instead of single-method interfaces. This has some advantages for code size, as we can go from (some linebreaks removed so as not to overstate the...

2

Solved

I have this interface that is being used by a handful of concrete types, such as EmailFormatter, TextMessageFormatter etc. public interface IFormatter<T> { T Format(CompletedItem completedI...
Sanctitude asked 7/8, 2011 at 15:14

1

Solved

I have these interfaces: public interface IUnitOfWork { IPersonRepository People { get; } IBookRepository Books { get; } int Commit(); } public interface IBookRepository { Book GetBookById(in...
Chalcography asked 4/8, 2011 at 1:53

0

A lot of people seem to use the PerWebRequest lifestyle in web apps for managing certain contexts. I have two concerns: PerWebRequest has a dependency on an http module (right?). 2. PerWebReque...
Edlun asked 27/7, 2011 at 14:13

1

Solved

I have seen in several code examples where people have used IKernel rather than use IWindsorContainer. Why is this? Here is one example: http://docs.castleproject.org/(S(kwaa14uzdj55gv55dzgf0vui)...

1

This was answered once, but the download site has since changed (apparently) since then. I cannot find Castle.MicroKernel at all. 2.51 can no longer be downloaded and its not in 2.52. or 2.53.
Stupendous asked 6/7, 2011 at 19:58

1

Solved

I have read often that Service Locators in IOC are an anti-pattern. Last year we introduced IOC (Ninject specifically) to our application at work. The app is legacy, it's very big and it's fragme...

3

Solved

I have several dependency injection services which are dependent on stuff like HTTP context. Right now I'm configuring them as singletons the Windsor container in the Application_Start handler, whi...
Underweight asked 30/11, 2009 at 10:1

3

Solved

Some dependency injection containers enable you to inject configured services into an already constructed object. Can this be achieved using Windsor, whilst taking account of any service dependen...
Anthonyanthophore asked 12/5, 2009 at 9:30

4

Solved

Anything like @PreDestroy in the spring-framework?
Hoagland asked 7/5, 2011 at 8:35

4

Solved

I would like to use Castle Windsor for dependency injection for my solution consisting of the following projects: Mvc [ASP.NET MVC 3 Web Application]: presentation layer (depends on Business and ...

2

Solved

Castle Windsor just came out with a Fluent interface for registering components as an alternative to using XML in a config file. How do I use this Fluent interface to register a Generic interface? ...
Acescent asked 5/6, 2011 at 4:32

2

Solved

I'm trying to set up some Moq repositories to test my service with Castle Windsor as my IOC. Mu service depends on IFoo, so I'm creating a moq instance that implements IFoo and injecting it into th...
Apocalyptic asked 28/6, 2010 at 15:57

3

Solved

Hi I am trying to get a website running with Mosso that has Castle Windsor as my IOC, however I am getting the following error. [SecurityException: That assembly does not allow partially trusted c...
Insurrection asked 4/2, 2010 at 15:23

2

Solved

In my ASP.Net MVC application I have implemented a Custom ActionFilter to Authorize users. I use CastleWindsor to provide dependency injection into all of the controllers as follows: protected v...

2

Solved

I'm currently making use of Castle Windsor version 2.1 as my container and would like to perform integration tests using the services registered with it. Currently, I do this my using the Common S...

2

Solved

I'm developing a website which attempts to utilize the SOA pattern. The services service both the main web app as well as an HTML5 mobile app and native iPhone and Android apps through the use of a...
Thenceforth asked 15/5, 2011 at 7:3

1

In the core of our application, we use Castle Windsor to manage our dependencies. We'll be loading plugins from third parties which may be using their own IoC containers. We'd like them to be able ...
Integumentary asked 13/5, 2011 at 6:3

1

Solved

I currently have a "PlugInFolder" folder where I want to copy my custom plug-in as DLL Library. Every plug-in implements my "IPlugIn" interface. I want to retrieve them at runtime with Windsor Ca...
Lampoon asked 10/5, 2011 at 17:44

2

Solved

I've added the CollectionResolver as a sub-resolver of my Windsor kernel, and it will properly inject collections of dependencies on resolved objects. That is, if I have class X { public X(ICompon...
Grassi asked 3/5, 2011 at 5:22

1

Solved

I have the following unit test in my application: [TestMethod] public void Windsor_Can_Resolve_HomeController_Dependencies() { // Setup WindsorContainer container = new WindsorContainer(); c...
Percipient asked 24/4, 2011 at 18:49

1

For example I have two interfaces: ICustomerService and IOrderService which each has a couple of functions like GetCustomer, GetOrder, etc. I want one class to implement both interfaces: Server. ...
Portuna asked 27/1, 2009 at 14:9

3

Solved

Given the below configuration Container.Register(Component.For<A>().Named("foo")); Container.Register(Component.For<B>().Named("foobar")); Container.Register( AllTypes.Pick() .Fr...
Payroll asked 16/3, 2009 at 17:34

© 2022 - 2024 — McMap. All rights reserved.