views:

113

answers:

1

I have the following:
TypeUser:ITypeUser
{
public TypeUser(Type usedType){..}
}

How do i configure the Type parameter in windsor config xml?

+2  A: 

For custom types you need provide a type converter to handle the conversion, however "Type" is supported out of the box (if you take a look at the list here on the castleproject site) and should "just work" i.e. like so:

<component id="myServer" service="SomeNameSpace.ITypeUser, SomeAssembly" type="SomeNameSpace.TypeUser, SomeLib">
    <parameters>
        <usedType>SomeNameSpace.MyOtherType, SomeAssembly</usedType>
    </parameters>
</component>
Bittercoder