XML Configuration File – Spring.Net

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  
  <configSections>
    <sectionGroup name="spring">
      <section name="context" type="Spring.Context.Support.ContextHandler, Spring.Core"/>
      <section name="objects" type="Spring.Context.Support.DefaultSectionHandler, Spring.Core" />
    </sectionGroup>
  </configSections>
 
  <spring>
 
    <context>
      <!--<resource uri="assembly://Spring.IocQuickStart.MovieFinder/Spring.IocQuickStart.MovieFinder/AppContext.xml"/>-->
      <resource uri="config://spring/objects"/>
    </context>
    <objects xmlns="http://www.springframework.net"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.springframework.net http://www.springframework.net/xsd/spring-objects.xsd">
 
      <description>An example that demonstrates simple IoC features.</description>
 
      <object id="AndreiRublevMovie" type="MovieFinderTestSpring.Net.Movie">
        <constructor-arg name="title" value="Andrei Rublev" />
        <constructor-arg name="director" value="Andrei Tarkovsky" />        
      </object>
      
      <object id="simpleMovieFinder" type="MovieFinderTestSpring.Net.SimpleMovieFinder"></object>
      <object id="simpleMovieLister" type="MovieFinderTestSpring.Net.MovieLister" singleton="true">
        <constructor-arg name="finder" ref="simpleMovieFinder"></constructor-arg>
      </object>
 
      <object id="colonDelimitedMovieFinder" type="MovieFinderTestSpring.Net.ColonDelimitedMovieFinder"></object>
        <object id="colonDelimitedMovieLister" type="MovieFinderTestSpring.Net.MovieLister" singleton="false">
        <property name="finder" ref="colonDelimitedMovieFinder"></property>
      </object>
 
      <object id="complexMovieListerBuilder" type="MovieFinderTestSpring.Net.ComplexMovieListerFactory"></object>
      <object id="complexMovieLister" factory-object="complexMovieListerBuilder" factory-method="Build" singleton="false"></object>
 
    </objects>
  </spring>
</configuration>

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s