Does anyone know how to configure WCF using Windsor on IIS 7.0? I'm using the latest from WCF Windsor facility trunk and Windsor 2.1.1. The example on http://www.castleproject.org/container/facilities/trunk/wcf/index.html is out of date. Even demo project in WCF facility doesn't mention how to setup WCF service in IIS using the config an...
Does anyone have a suggestion on a better way to intercept a properties with Castle DynamicProxy? Specifcally, I need the PropertyInfo that I'm intercepting, but it's not directly on the IInvocation, so what I do is:
public static PropertyInfo GetProperty(this MethodInfo method)
{
bool takesArg = method.GetParameters...
Hi,
How would I go about globally intercepting the creation/resolution of all instances by my container? I know I can do this individually with OnCreated on a per-component basis, but I want to do this globally for all objects resolved by the container.
Thanks.
...
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.IBasicRepository`1, MyApp.Models"
type="MyApp.Models.Repositories.Linq.BasicRepository`1, MyApp.Models"
lifestyle="perWebRe...
How can I use an IComponentActivator instance for a component, not just specifying a type.
That is, instead of
Component.For<XYZ>.Activator<MyComponentActivator>();
I want to be able say
Component.For<XYZ>.Activator(new MyComponentActivator(someImportantRuntimeInfo));
Also, is there a way I can choose an activator dynamically fo...
I see that i can specify this behavior in xml by using the following:
<component
id="notification"
service="Acme.Crm.Services.INotificationService, Acme.Crm"
type="Acme.Crm.Services.EmailNotificationService, Acme.Crm"
inspectionBehavior="none">
</component>
But how do I do this using fluent registration?
...
We are using the NoTrackingReleasePolicy on the Windsor container due to the memory leaks that occur when we do not Release our components after usage. Now consider the following problem.
Some disposable component:
public class DisposableComponent : IDisposable
{
private bool _disposed;
public bool Disposed
{
get {...
windsorContainer.Register(
Component.For<ClassWithReferenceToDisposableService>()
.LifeStyle.Transient
.DynamicParameters((k, d) =>
{
d["disposableComponent"] =
...
Hi,
In googling I can't seem to find an example of intercepting event on a proxied type and it doesn't seem to be working for me. Is there a way I can do this (ie. use an IInterceptor when an event is invoked)?
Thanks.
...
Hi
We're using the castle scheduler component: http://using.castleproject.org/display/Comp/Castle.Components.Scheduler?showChildren=false
I have a wcf service which creates the tasks and that does it's job fine.
I then have a console app running (will be a windows service eventually) which should then keep an eye out for tasks to run....
I’m fairly new to IoC and perhaps my understanding of generics and inheritance is not strong enough for what I’m trying to do. You might find this to be a mess. I have a generic Repository<TEntity> base class:
public class Repository<TEntity> where TEntity : class, IEntity
{
private Table<TEntity> EntityTable;
private st...
2 questions in one, but very much related.
Is it possible with Castle Windsor to resolve a configuration entry such as -
Assembly.Namespace.Object1`2[[${ComponentId1}],[${ComponentId2}]], Assembly
Where ComponentId1 and ComponentId2 are defined as components. Castle Windsor doesn't seem to be resolving the ComponentId, it is just look...
I have the following component mapping in Windsor xml:
<component
id="dataSession.DbConnection"
service="System.Data.IDbConnection, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
type="System.Data.SqlClient.SqlConnection, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e08...
How can I use my Windsor container to check if an instance (not just a component) has been registered?
ie. container.ContainsInstance(typeof(MyType))
[EDIT]
Another way of writing this might be
Kernel.GetAssignableHandlers(typeof(object))
.Where(handler => handler.Service == typeof(MyType) || handler.ComponentModel.Implementa...
I am trying to use Castle Windsor with MS Test. The test class only seems to use the default constructor. How do I configure Castle to resolve the service in the constructor?
Here is the Test Class' constructors:
private readonly IWebBrowser _browser;
public DepressionSummaryTests()
{
}
public Depress...
I am injecting HttpContextBase into a caching class. HttpContextBase is registered as PerWebRequest. I interact with the caching class on each web request and this works fine, but I also need to initialise the cache at application start.
I understand that PerWebRequest does not work in Application_Start though:
http://stackoverflow.com...
Hi,
I'm getting an exception calling Resolve:
KernelException: Could not instantiate custom activator
Inner Exception:
{"Constructor on type 'MyProj.MyAdapter`1[[MyProj.MyBusinessObject, MyAsm, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]' not found."}
There's definitely a public parameterless constructor there (and I've v...
Does anyone know of a good book on the Castle Project?
I'm interested in learning more about any of the Castle projects (ActiveRecord, MonoRail, Windsor, anything!) and searches for Castle on Amazon are a little frustrating with the need to weed out all the fiction and nonsense.
...
I'm trying to use Windsor as a factory to provide specification implementations based on subtypes of XAbstractBase (an abstract message base class in my case).
I have code like the following:
public abstract class XAbstractBase { }
public class YImplementation : XAbstractBase { }
public class ZImplementation : XAbstractBase { }
public...
I can't seem to see it...
...