Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
0 answers
419 views

How to upgrade Castle.windsor from version 4 to version 5.0.1

While upgrading Castle.Windsor to version 5, I found out that the PerWebRequest is removed from LifestyleTypes enum. In my application I am registering the components with different lifestyles like ...
applied ai's user avatar
0 votes
1 answer
77 views

Register multiple endpoints of same contract in WCF and Castle windsor

I'm looking for some help on implementing WCF Castle injection in one of my projects Basically, we are developing an configuration tool which would synchronize the data between our test and ...
Sri Satya Krishna Challa's user avatar
2 votes
1 answer
861 views

Inject Value from web.config using Castle.Windsor

I'm migrating some applications to .NET Core and I have to inject a value from web.config. Using .Net Framework (4.7.2) I did it using Dependency.OnAppSettingsValue. But I cannot find this option any ...
luckses's user avatar
  • 21
0 votes
3 answers
930 views

Can not resolve a generic service using manual interception with ASP.NET Core 2 and Castle.Core

I know there are a lot of question similar to this one but actually none of them solved my issue. I created a new Asp.Net Core 2 application. Now I am trying to use an intercepter for a specific ...
Rey's user avatar
  • 3,972
1 vote
2 answers
815 views

How to update already registered service Castle Windsor

I'm a beginner to the DI containers. I'm using third party framework and it has a class like below public class PurchaseOrderAppService : IPurchaseOrderAppService, IAutoRegister { ...
Han Eui-Jun's user avatar
0 votes
1 answer
752 views

How do I setup Windsor container on a console application to inject to external library

I have a console app and web API both referencing the same data layer which is a separate project. In that data layer, I have a class that requires a repository that we are grabbing from the ...
Ryan's user avatar
  • 71
1 vote
1 answer
864 views

How to avoid Service locator / Implement Service locator with CastleWindsor in ASP.NET MVC

I'm using CastleWindsor as my dependency injection framework and it all works well when you're in a Controller, because we can make use of constructor injection with the controllerfactory. But there ...
qkp's user avatar
  • 161
3 votes
2 answers
300 views

Reusing Registrations with Castle Windsor Installers?

We currently have 2 web applications, one is a front end customer facing application while the other is an administrative backend application. What we noticed is that alot of registration is ...
Mike's user avatar
  • 65
1 vote
1 answer
2k views

Does Castle Windsor keep a reference of resolved object with lifestyle transient? [closed]

If castle keep a reference to that object, where can i access to that? There is a list of that reference somewhere inside the container? I'm using Castle Windsor 3.3.0
abrfra's user avatar
  • 654
0 votes
2 answers
425 views

Windsor circular dependency of a transient-lifestyle component

I've got a bunch of classes written like this: public class MyService1 { public MyService1(MyService1Settings settings, <service-dependent list of dependencies filled by Windsor>) { ... } } ...
Gman's user avatar
  • 1,876
8 votes
2 answers
883 views

Can I define custom attributes for proxy type in Castle Windsor

I have a class that I proxy it with Castle Dynamic Proxy. I want to add some custom Attributes to proxy methods (which is not defined in proxied class). Is this possible. I want this because I want ...
hikalkan's user avatar
  • 2,272
2 votes
1 answer
644 views

Castle windsor: Register generics with more than one items

I have a generic interface defined like this - public interface IGenericRepository<TEntity, TDbContextType> where TEntity : class where TDbContextType : IDbContextType This interface ...
Sai's user avatar
  • 675
4 votes
0 answers
587 views

Castle Windsor and LifestyleBoundTo(scopeRootBinder)

I cant find any examples of using scopeRootBinder. I'm not sure if it can help me. Here's the problem(test). I need that each instance of ChildService gets build with its own instance of Component2. ...
user1325696's user avatar
3 votes
2 answers
8k views

Register WCF Service components in Castle Windsor

I haven't found anyone else with this issue so I'm assuming it is my own fault that this is happening. I very green when it comes to WCF and Castle Windsor IoC container so that would probably be the ...
pfluggs11's user avatar
  • 166
1 vote
1 answer
791 views

Dynamic Constructor Injection using IWindsorInstaller

I'm not sure if this is possible, but I though I'd ask the question anyway. I have a scenario where I have a number of different tasks which send emails during processing. The sending of emails is ...
Matt Sugden's user avatar
4 votes
1 answer
841 views

Carrying CreationContext.AdditionalArguments on Castle Windsor

I need to pass some arguments to a custom AbstractLifestyleManager derived type. When I request an instance of a type from the container, I use the following overload: T Resolve<T>(string key,...
Nikos Baxevanis's user avatar
2 votes
3 answers
180 views

IoC and "hiding implementation details"

I implemented DI in my project through constructor injection, now the composition root is where all resolving takes place (this is, at the web project), and my question is whether the idea of creating ...
bevacqua's user avatar
  • 48.4k
1 vote
0 answers
88 views

How to detect which constructor was used to create instance by Windsor?

I have a class with multiple constructors. Is it possible to detect which constructor Windsor used to create instance?
den123's user avatar
  • 801
5 votes
1 answer
2k views

injecting connection strings to DI resolved classes

I am using Castle to create my database context based on a given interface. I have the following code in my Installer class and this works fine at the moment. private ConfigureDelegate ...
Adam Stewart's user avatar
  • 1,993
0 votes
2 answers
2k views

Using strongly-typed configuration parameters in Windsor Installer

I've been cracking my head over installing a Windsor container using a custom configuration object. It seems simple, but apparently there's something important I'm just not getting. I'll be grateful ...
escargot agile's user avatar
11 votes
2 answers
3k views

IoC - Constructor takes a runtime value as one parameter and a service as another

I have a WPF app which, when it starts, looks at the file system for some config files For each config file it finds, it displays some info in a different window Each window has an associated ...
ChrisCa's user avatar
  • 11k
1 vote
1 answer
91 views

Can I use Ioc pattern to achieve the following goal

I have two classes implemented the same static methods like the following, Class A { static OpB(); } Class B { static OpB(); } Can I use Ioc pattern to switch ClassA and ClassB using the ...
user496949's user avatar
  • 85.9k
0 votes
1 answer
328 views

Castle Windsor Typed Factory Weirdness

I'm getting some very unexpected (I think) behavior with the Typed Factory facility. Basically, it's reusing transient component instances for constructor injection with Func<T>. Here is the ...
Jeff's user avatar
  • 36.5k
1 vote
1 answer
202 views

Tell C# to use Castle to create objects

I think my question is a long shot. Lets say I have an attribute: public sealed class MyCustomAttribute: ActionFilterAttribute Used on a class method [MyCustomAttribute] public virtual ...
vIceBerg's user avatar
  • 4,297
1 vote
1 answer
392 views

How do I set up Array/List dependencies in code with Castle Windsor?

I have the following classes: class Repository : IRepository class ReadOnlyRepository : Repository abstract class Command abstract CommandImpl : Command { public CommandImpl(Repository ...
SharePoint Newbie's user avatar