How do I instantiate a string array object into a Spring.Net container? -
What I'm getting logically, is something like this:
& lt; Object id = "foobarList" type = "string []" & gt; & Lt; List & gt; & Lt; Price & gt; Foo & lt; / Pricing & gt; & Lt; Price & gt; Bar & lt; / Pricing & gt; & Lt; / List & gt; & Lt; / Object & gt;
Any ideas?
this is not enough string []
, but you can use it Are:
& lt; Object id = "foobarList" type = "System.Collections.ArrayList" & gt; & Lt; Manufacturer-Arg & gt; & Lt; List & gt; & Lt; Price & gt; Foo & lt; / Pricing & gt; & Lt; Price & gt; Bar & lt; / Pricing & gt; & Lt; / List & gt; & Lt; / Creator-arg & gt; & Lt; / Object & gt;
There is a way to form a string [] in the form of a spring but it is very painful (create a string object), then using a type object Use the GetType method, then pass it to the ArrayList.GetArray method to get your string [] object.
There are some recent improvements in this area but not yet in a stable release Small factory category It's easy to create or change the category that requires something a string.
Comments
Post a Comment