Castle Windsor Fluent Registration Problem?

That's one of less intuitive things about the API. If you take a look at the documentation you'll find that Pick BasedOn and Where do xor, so the code above would register two sets of types.

That's one of less intuitive things about the API. If you take a look at the documentation, you'll find that Pick BasedOn and Where do xor, so the code above would register two sets of types: Types that have name ending with "View" (with default connfiguration, that is as themseles) Types that are based on IHandleThe (all of them found in the assembly, the previous condition does not apply here) and configure them to the base service, and whatever the DoStuff method does. To achieve what you want (based on the type AND if name ends with If) the BasedOn call must go first, all the other ones must go after it.

Krzysztof and thanks for helping, the point is: just BasedOn() does not work. The If-Line is only for Stackoverflow to show people that the BasedOn version is not working but using the if without BasedOn does. Just to prove it is not a too stupid mistake like the assembly is not there.

I only want types implementing IHandleThe. Nothing with a name like "View". But I do understand that you would expect the above code to work like it is (with the commented or deleted if-line).

Any other idea what could be the cause? – Gope Aug 24 '10 at 6:59 ok, which version are you using? Are you sure there are any types implementing IHandlerThe in that assembly?

I've written code like this on quite a few projects - it has to work – Krzysztof Koźmic Aug 24 '10 at 7:22 Yup, IHandleThe is implemented by one Class (MainView) and the configure part relies on that type which is working with the if line. So that can't be the problem but maybee the version? The Castle.Windsor.

Dll is of version 2.1.0.6655. I copied it over from a friends Rhino-ESB demo. Could there be problems with 64/32 bit stuff in the Castle assemblies?

I just found that 2 of my 4 Projects have a build type of x86 while the others (without referenced external assemblies) are on anyCPU... strange... by the way, its all on . NET 4.0 – Gope Aug 24 '10 at 12:16 I can't really say I know what the problem is. As it usually turns out in situations like this it's something stupidly obvious, yet I don't know what could that be.

How are the types registered? Are they registered at all? – Krzysztof Koźmic Aug 24 '10 at 13:03 I think you're right.As this is just a demo for the service-bus stuff it's not too much of a problem.

I will try this in a new blank solution and if it works nevermind. But first thanks for your support and also many thanks for putting your precious time into the Castle Project. There are lots of people really appreciating that!

Cheers, Gope – Gope Aug 24 '10 at 13:33.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions