castle-windsor Questions

2

I'm registering some components related to Linq2Sql using PerWebRequest lifestyle. I see them get created, but they get destroyed before my global's Application_EndRequest method gets called. Is th...
Embryo asked 24/12, 2009 at 3:39

1

Solved

The Castle wiki says at several places I should ALWAYS call container.Release() for components resolved through the container. This obviously makes sense for sophisticated life-style management tec...
Berstine asked 26/7, 2010 at 11:2

1

Solved

What configuration do I need to setup a static property dependency using Windsor container? I have the following class at the moment and I would like the Logger property to be injected. static cl...
Mccabe asked 12/7, 2010 at 12:11

1

Solved

Is it considered bad form to register components in Windsor without specifying an interface? i.e. container.Register(Component.For<MyClass>().LifeStyle.Transient); as opposed to... contai...
Laverne asked 28/6, 2010 at 11:29

3

Solved

I have a class that I want to have access to my IOC container (Windsor), however I don't want to keep a static IWindsorContainer property hanging around - I would prefer to have the container injec...
Ridinger asked 23/3, 2009 at 13:48

3

Solved

I have a component that has a dependency on UrlHelper that I need to register using Castle Windsor. UrlHelper in turn has depdendencies on RequestContext (and RouteCollection). Now my controller h...
Hindustani asked 2/6, 2010 at 13:47

1

Solved

I have the following mapping in my Castle Windsor xml file which has worked okay (unchanged) for some time: <component id="defaultBasicRepository" service="MyApp.Models.Repositories.IBasicRepo...
Damnatory asked 2/6, 2010 at 22:59

1

Solved

I was using WindsorControllerFactory from mvccontrib.castle lib until now, after i migrated to mvc 2 it doesn't work anymore, I've downloaded the latest mvccontrib release and no factories in there...
Preoccupation asked 23/4, 2010 at 18:59

1

Solved

Consider this example: public class Factory { private List<ISubFactory> subFactories; public Factory(List<ISubFactory> subFactories) { this.subFactories = subFactories; } } ...
Mckenzie asked 20/4, 2010 at 6:5

2

Solved

New to Castle/Windsor, please bear with me. I am currently using the framework System.Web.Mvc.Extensibility and in its start up code, it registered HttpContextBase like the following: container.R...
Hewart asked 19/4, 2010 at 20:41

2

Solved

How can I inject the value of an appSettings entry (from app.config or web.config) into a service using the Windsor container? If I wanted to inject the value of a Windsor property into a service, ...
Toogood asked 28/10, 2008 at 21:28

4

Solved

So my company uses Castle Windsor IoC container, but in a way that feels "off": All the data types are registered in code, not the config file. All data types are hard-coded to use one interface ...
Gyrostatic asked 21/3, 2010 at 21:32

1

Solved

I am using the MvcContrib library with Castle Windsor and I am having a problem with setting a parameter when I register a component. I have the following interfaces for classes that wrap a DataCo...
Catechin asked 24/2, 2010 at 16:32

4

Solved

After all what I have read about Dependency Injection and IoC I have decided to try to use Windsor Container within our application (it's a 50K LOC multi-layer web app, so I hope it's not an overki...

2

Solved

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...

2

Solved

in asp.net-mvc I have the Windsor Controller Factory that injects all the dependencies into the controllers, but how do you get this in Windows Forms ? for example if have this Form1, how am I goi...

2

Solved

I'm new to Castle Windsor and am just using the latest version. I've created entries for my repositories which are working fine but I have one final dependency that I'm passing into my controller. ...

4

Solved

I'm building an ASP.NET MVC application that uses a DDD (Domain Driven Design) approach with database access handled by NHibernate. I have domain model class (Administrator) that I want to inject a...

2

trying to work my way through Steve Sandersons MVC book - but have hit a brick wall when creating the WindsorControllerFactory. It looks as though the method has changed from MVC1 to MVC2. This is ...
Bellebelleek asked 10/1, 2010 at 20:7

4

I am castle Windsor and it works great for controller constructors in passing in the repository that is being used. private IStoryRepository Repository; public StoryController(IStoryRepository Re...
Maher asked 18/8, 2009 at 8:24

1

Solved

We are evaluating IoC containers for C# projects, and both Unity and Castle.Windsor are standing out. One thing that I like about Unity (NInject and StructureMap also do this) is that types where i...

1

Solved

This registration works when all the implementations of IService are public: AllTypes .Of<IService>() .FromAssembly(GetType().Assembly) .WithService.FirstInterface() For example: publi...
Sarene asked 3/12, 2009 at 1:8

2

Solved

I'm wondering how I should store/reference my dependency injection container(s). Is it alright to have a container be a static property on a static class? Or should I have the container be an insta...

3

Solved

I'm trying to implement my custom authorize attribute like: public class MyCustomAuth : AuthorizeAttribute { private readonly IUserService _userService; public MyCustomAuth(IUserService userSe...

1

Solved

I'm just starting with Windsor, so please be gentle :) I have a scenario where I want to be able to override/replace components placed inside a windsor container. Read on ... In my prod code, I wa...
Matchmaker asked 6/11, 2009 at 13:23

© 2022 - 2024 — McMap. All rights reserved.