diff Implab.Playground/data/sample.xml @ 277:963b17c275be v3

Refactoring Added <array> element to injection parameters Working on registrations of factories
author cin
date Sat, 28 Apr 2018 18:48:09 +0300
parents 22629bf26121
children 6691aff01de1
line wrap: on
line diff
--- a/Implab.Playground/data/sample.xml	Sat Apr 28 00:11:38 2018 +0300
+++ b/Implab.Playground/data/sample.xml	Sat Apr 28 18:48:09 2018 +0300
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <container xmlns="http://implab.org/schemas/servicehost/unity.v1.xsd">
     <namespace name="System"/>
+    <namespace name="System.Collections.Generic"/>
     <namespace name="Implab.Playground"/>
     
     <!-- foo1 -->
@@ -21,6 +22,11 @@
     </register>
 
     <register type="Foo">
+        <method name="AddRange">
+            <array itemsType="Foo">
+                <dependency name="foo2"/>
+            </array>
+        </method>
     </register>
 
     <register type="IContainer{}" mapTo="Container{}">
@@ -28,6 +34,15 @@
         <method name="SetInstance">
             <dependency type="T"/>
         </method>
+        <method name="AddRange">
+            <array itemsType="T">
+                <dependency name="foo2"/>
+            </array>
+        </method>
+    </register>
+
+    <register type="List{}">
+        <constructor />
     </register>
 
     <register type="IContainer{String}" mapTo="Container{String}">
@@ -46,4 +61,8 @@
     <value name="connection1" type="String"><![CDATA[Connect me <here>!]]></value>
     <value name="name1" type="String" value="Hello!"/>
 
+    <factory name="foo3" type="FooFactory">
+        <parameter name="FooName"><![CDATA[Wired "" objecty <> name @#$%^&]]></parameter>
+    </factory>
+
 </container>
\ No newline at end of file