Drawer
08-25-2006, 05:13 PM
Hello all!
I have a problem with creating a type object by Spring.NET.
For configurations:
<object id="MyType" type="System.Type" factory-method="GetType">
<constructor-arg index="0" value="SomeClass, SomeAssembly" />
</object>
or
<object id="MyType" type="System.Type" factory-method="GetType">
<constructor-arg value="SomeClass, SomeAssembly" />
</object>
Spring creates RuntimeTypeHandle scructure, instead of Type.
For configs:
<object id="MyType" type="System.Type" factory-method="GetType">
<constructor-arg name="typeName" value="SomeClass, SomeAssembly" />
</object>
or
<object id="MyType" type="System.Type" factory-method="GetType">
<constructor-arg name="string" value="SomeClass, SomeAssembly" />
</object>
Spring throws exception: Cannot find matching factory method 'GetType' on Type [System.Type].
Does anybody know why?
I have a problem with creating a type object by Spring.NET.
For configurations:
<object id="MyType" type="System.Type" factory-method="GetType">
<constructor-arg index="0" value="SomeClass, SomeAssembly" />
</object>
or
<object id="MyType" type="System.Type" factory-method="GetType">
<constructor-arg value="SomeClass, SomeAssembly" />
</object>
Spring creates RuntimeTypeHandle scructure, instead of Type.
For configs:
<object id="MyType" type="System.Type" factory-method="GetType">
<constructor-arg name="typeName" value="SomeClass, SomeAssembly" />
</object>
or
<object id="MyType" type="System.Type" factory-method="GetType">
<constructor-arg name="string" value="SomeClass, SomeAssembly" />
</object>
Spring throws exception: Cannot find matching factory method 'GetType' on Type [System.Type].
Does anybody know why?