I am trying to inject an IList into a constructor and want to know if this is possible and if so could someone enlightern me? The fact its asking for a type converter makes me think I can't do it.
I tried....
<object name="DataLayer.DataServices.IGetAccountDatabase" type="DataServices.LinqToEntities.EntityDataModel, DataServices.LinqToEntities" singleton="false"></object>
<object name="DataLayer.DataServices.IGetAccountMessage" type="DataServices.VMX.VmxModel, DataServices.VMX" singleton="false"></object>
<object name="DataLayer.DataServices.IDataService" type="DataServices.NavigationModel, DataServices" singleton="false">
<constructor-arg>
<list element-type="DataLayer.DataServices.IGetAccount, DataLayer" >
<idref object="DataLayer.DataServices.IGetAccountMessage"/>
<idref object="DataLayer.DataServices.IGetAccountDatabase"/>
</list>
</constructor-arg>
</object>
Error creating object with name 'DataLayer.DataServices.IDataService' defined in 'file [D:\Workspace\DataServices\Main\Source\DataServices\TestResults\2010-07-30 11_58_31\Out\Spring.xml]' : Initialization of object failed : Unable to convert managed list element 'DataLayer.DataServices.IGetAccountMessage' from [System.String] into [DataLayer.DataServices.IGetAccount] during initialization of property 'constructor argument' for object 'DataLayer.DataServices.IDataService'. Do you have an appropriate type converter registered?
Any help appreciated. thnx