Click here to Skip to main content
15,896,207 members
Articles / Programming Languages / XML

Dependency Injection using Spring.NET

Rate me:
Please Sign up or sign in to vote.
4.39/5 (23 votes)
28 May 2008CPOL5 min read 167.5K   4.2K   64  
Dependency Injection and how it is supported in Spring.NET.
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>8.0.50727</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{2678D2E1-8B6B-4A2C-8E17-491D30806E56}</ProjectGuid>
    <OutputType>WinExe</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>WinClient</RootNamespace>
    <AssemblyName>WinClient</AssemblyName>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="antlr.runtime, Version=2.7.6.2, Culture=neutral, PublicKeyToken=65e474d141e25e07, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\..\..\..\..\..\Program Files\Spring.NET 1.1 RC2\bin\net\2.0\release\antlr.runtime.dll</HintPath>
    </Reference>
    <Reference Include="Common.Logging, Version=1.2.0.0, Culture=neutral, PublicKeyToken=af08829b84f0328e">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\..\..\..\..\..\Program Files\Spring.NET 1.1 RC2\bin\net\2.0\release\Common.Logging.dll</HintPath>
    </Reference>
    <Reference Include="Spring.Aop, Version=1.1.0.2, Culture=neutral, PublicKeyToken=65e474d141e25e07, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\..\..\..\..\..\Program Files\Spring.NET 1.1 RC2\bin\net\2.0\release\Spring.Aop.dll</HintPath>
    </Reference>
    <Reference Include="Spring.Core, Version=1.1.0.2, Culture=neutral, PublicKeyToken=65e474d141e25e07, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\..\..\..\..\..\Program Files\Spring.NET 1.1 RC2\bin\net\2.0\release\Spring.Core.dll</HintPath>
    </Reference>
    <Reference Include="System" />
    <Reference Include="System.configuration" />
    <Reference Include="System.Data" />
    <Reference Include="System.Deployment" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Windows.Forms" />
    <Reference Include="System.Xml" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Customer\frmCustomer.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="Customer\frmCustomer.Designer.cs">
      <DependentUpon>frmCustomer.cs</DependentUpon>
    </Compile>
    <Compile Include="Employee\frmEmployee.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="Employee\frmEmployee.Designer.cs">
      <DependentUpon>frmEmployee.cs</DependentUpon>
    </Compile>
    <Compile Include="frmMain.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="frmMain.Designer.cs">
      <DependentUpon>frmMain.cs</DependentUpon>
    </Compile>
    <Compile Include="Presenters\Employee.cs" />
    <Compile Include="Presenters\Customer.cs" />
    <Compile Include="Presenters\IPresenter.cs" />
    <Compile Include="Program.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
    <EmbeddedResource Include="Customer\frmCustomer.resx">
      <SubType>Designer</SubType>
      <DependentUpon>frmCustomer.cs</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="Employee\frmEmployee.resx">
      <SubType>Designer</SubType>
      <DependentUpon>frmEmployee.cs</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="frmMain.resx">
      <SubType>Designer</SubType>
      <DependentUpon>frmMain.cs</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="Properties\Resources.resx">
      <Generator>ResXFileCodeGenerator</Generator>
      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
      <SubType>Designer</SubType>
    </EmbeddedResource>
    <Compile Include="Properties\Resources.Designer.cs">
      <AutoGen>True</AutoGen>
      <DependentUpon>Resources.resx</DependentUpon>
      <DesignTime>True</DesignTime>
    </Compile>
    <None Include="App.config" />
    <None Include="Properties\Settings.settings">
      <Generator>SettingsSingleFileGenerator</Generator>
      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
    </None>
    <Compile Include="Properties\Settings.Designer.cs">
      <AutoGen>True</AutoGen>
      <DependentUpon>Settings.settings</DependentUpon>
      <DesignTimeSharedInput>True</DesignTimeSharedInput>
    </Compile>
    <Compile Include="WinClient.cs" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\BLL\BLL.csproj">
      <Project>{2E3ACCD1-D396-404C-9297-486D0CFB2F50}</Project>
      <Name>BLL</Name>
    </ProjectReference>
    <ProjectReference Include="..\DAL\DAL.csproj">
      <Project>{E1E9220A-63B2-41C3-AA26-2DC58BE56C75}</Project>
      <Name>DAL</Name>
    </ProjectReference>
  </ItemGroup>
  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
</Project>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect Cognizant Technology Solutions
United States United States
Solution Architect working for Cognizant Technology Solutions.

Comments and Discussions