castle-windsor Questions

3

Solved

I am using Castle Windsor 2.5.1 in an ASP.NET MVC project and using property injection to create an object which I expect to always be available on a base controller class. I am using a factory to ...
Cartwheel asked 9/12, 2010 at 12:17

1

Solved

I'm trying to add Castle Windsor to my Web API project, and am following this post, but am getting a compile-time error on this line of code: this._scope = container.BeginScope(); ...as "'Castle...

3

I have been working on injecting AutoMapper into controllers. I like the implementation of Code Camp Server. It creates a wrapper around AutoMapper's IMappingEngine. The dependency injection is don...
Apothecary asked 12/11, 2009 at 3:37

3

Solved

I want to implement Dependency Injection in WebApi application using Castle Windsor. I have following sample code - Interface - public interface IWatch { { DateTime GetTime(); } } Following ...
Harve asked 11/11, 2013 at 11:26

2

Solved

I have an assembly called 'MyApp.DAL' and it contains and interface IRepository. I also have another assembly 'MyApp.Repository' where I have slightly more complex repositories deriving from IRepos...
Tletski asked 15/11, 2013 at 8:8

2

Solved

I'm trying to setup Castle Windsor for the first time and I'm having some problems with it. I have three projects in my solution: Domain DAL Web The services are located in DAL. They all inherit ...
Bijouterie asked 2/11, 2013 at 14:52

2

I am trying to create a custom resolver for automapper which needs to access one of my data repositories to retreive the logged in users account. Here is my code so far... public class FollowingR...

3

Solved

I can imagine this might be quite straight forward to do in Castle but I'm new to the technology and have been Googling for hours with no luck! I have the following: container.Register( Component...
Vacillating asked 18/8, 2011 at 13:19

1

Solved

I have hit a problem in my use of Castle.Windsor's TypedFactoryFacility concept, and not sure how to resolve it (or if I can). I have a ViewModel defined like so; public class MyViewModel : IMyVi...
Sitton asked 3/10, 2013 at 23:22

3

Solved

Occasionally I find myself in a situation where I need to resolve a service only if a certain condition is met. For example, a user might select to send an email or an sms notification. I would lik...
Seriate asked 26/12, 2012 at 15:27

3

Solved

I read this article and saw many people commented that do not use Castle Windsor to implement IDependencyResolver in ASP.NET MVC3 and stick with a custom IControllerFactory. Basically my questions ...
Caliche asked 17/8, 2013 at 22:23

2

Solved

I have an issue in Castle Windsor. Please help me! I'm using Castle Windsor 3.2.0.0, .Net 4.0 and Mvc 3.0.0.0 Thank you so much! Issue: No component for supporting the service Mvc IControllerFac...
Upstage asked 2/7, 2013 at 6:35

1

Solved

I'm writing command line application and using Castle Windsor as DI. Castle Windsor is new for me, decided to learn another DI container. Otherwise I'm usually using Autofac. I'm trying to registe...
Decomposition asked 25/6, 2013 at 23:48

4

Solved

I am using Castle Windsor to manage controller instances (among other things). My controller factory looks like this: public class WindsorControllerFactory : DefaultControllerFactory { private W...
Indraft asked 16/9, 2009 at 19:7

5

Solved

I don't know if this is too specific a question, if that is possible, but I'm having to port an app that uses Castle Windsor to Unity so that there isn't a reliance on non-microsoft approved librar...
Hemoglobin asked 24/12, 2008 at 13:19

6

Solved

I want to redefine an (default) implementation in a given windsor-container. Is that what OverWrite is for? Doesn't work, though. container.Register( Component.For<IServiceOperationAuthorizati...
Herbherbaceous asked 18/3, 2009 at 13:55

3

Solved

I have been building a new .NET solu­tion with Cas­tle per­form­ing my DI. Its now at the stage where i would like to con­trol the order in which my installers run. I have built indi­vid­ual clas...

1

Solved

I have been trying to fix this issue for quite a while and I am still none the wiser. I have got the following method: public IResult Parse(string[] args) { var argumentOption = new ArgumentOptio...
Garica asked 8/5, 2013 at 9:25

2

Solved

I have a class that calls out to an internet service to get some data: public class MarketingService { private IDataProvider _provider; public MarketingService(IDataProvider provider) { _provi...
Underground asked 29/4, 2013 at 19:27

2

Solved

I have this code from old castle: IoC.Container.Register( AllTypes .FromAssemblyNamed(a) .Pick().WithService.FirstInterface() .Configure(o => o.LifeStyle.PerWebRequest)); When I upgrade ...
Less asked 26/4, 2013 at 8:29

3

Solved

Recently, I have been trying to understand what is the difference between using the Service Locator "anti-pattern" and using the Castle Windsor container. I have found some info here and ther...
Cryptogram asked 20/4, 2013 at 16:14

1

Solved

I decided to clean this post up and I posted a sample project at ge.tt/3EwoZEd/v/0?c Spent around 30 hours on this already and still can't figure it out... help would be really appreciated! I hav...

1

Solved

I use the Entity Framework database-first approach to generate a DbContext / POCO model for an MVC application. I want to avoid having dependencies on DbContext in my controllers to enable me to sw...

0

I was using PerWebRequest Lifestyle from Castle Windsor(version 3.0.0.4001). I wanted to update it to the latest version (3.2). In the latest version the, it says does not contain a definition fo...
Coeternity asked 26/3, 2013 at 6:0

1

Solved

OK I think there is maybe too much information about Castle Windsor because looking for these keywords gives me examples of everything, and frankly I don't understand enough about how it works to p...

© 2022 - 2024 — McMap. All rights reserved.