view Implab.Playground/data/sample.xml @ 272:9d1cca834b05 v3

preview version of Unity xml configuration
author cin
date Thu, 26 Apr 2018 03:14:54 +0300
parents ade80d94dfb5
children 79110a16cab7
line wrap: on
line source

<?xml version="1.0" encoding="UTF-8"?>
<container xmlns="http://implab.org/schemas/servicehost/unity.v1.xsd">
    <namespace name="System"/>
    <namespace name="Implab.Playground"/>
    
    <!-- foo1 -->
    <register name="foo1" type="Foo">
        <property name="Name">
            <value>FOO!</value>
        </property>
    </register>

    <!-- foo2 -->
    <register name="foo2" type="Foo">
        <property name="Name"> 
            <value>GOOD</value>
        </property>
        <property name="IntValue">
            <value>2</value>
        </property>
    </register>

    <register type="Foo">
    </register>

    <register provides="IContainer{}" type="Container{}">
        <constructor/>
        <method name="SetInstance">
            <dependency type="T"/>
        </method>
    </register>

    <register provides="IContainer{String}" type="Container{String}">
        <constructor/>
        <method name="SetInstance">
            <value type="String">Hello!</value>
        </method>
    </register>

</container>