Skip to content

Commit

Permalink
Added support for the factory extension
Browse files Browse the repository at this point in the history
  • Loading branch information
remogloor committed Dec 21, 2011
1 parent 6a5d4d5 commit 84c346e
Show file tree
Hide file tree
Showing 21 changed files with 166 additions and 631 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -9,6 +9,8 @@ dist
*.cache
lib/Ninject/*.zip
lib/Ninject/*/**
lib/Ninject.Extensions.Factory/*.zip
lib/Ninject.Extensions.Factory/*/**
/src/Ninject.Extensions.Conventions/StyleCop.Cache
/src/Ninject.Extensions.Conventions.Test/StyleCop.Cache
/src/Ninject.Extensions.Conventions.sln.docstates
Expand Down
24 changes: 18 additions & 6 deletions Ninject.Extensions.Conventions.build
Expand Up @@ -7,7 +7,7 @@
<property name="product.description" value="Conventions extension for Ninject" overwrite="false"/>
<property name="product.platforms" value="net-3.5,net-4.0,silverlight-4.0,silverlight-3.0,silverlight-2.0,silverlight-4.0-wp7,mono-2.0,netcf-3.5" overwrite="false"/>
<property name="product.buildserverPlatforms" value="net-3.5,net-4.0,silverlight-4.0,silverlight-3.0,silverlight-2.0,mono-2.0,netcf-3.5" overwrite="false"/>
<property name="dependencies" value="Ninject" overwrite="false"/>
<property name="dependencies" value="Ninject,Ninject.Extensions.Factory" overwrite="false"/>

<include buildfile="Ninject.include" />
<target name="all" depends="core test silverlight-test"/>
Expand All @@ -26,14 +26,21 @@
<include name="System.Core.dll"/>
<include name="System.Web.dll" unless="${build.platform == 'silverlight-2.0'}"/>
<include name="${path.lib}/Ninject/${build.platform}/Ninject.dll"/>
<include name="${path.lib}/Ninject.Extensions.Factory/${build.platform}/Ninject.Extensions.Factory.dll"/>
</references>
</csc>
</target>

<target name="compile-tests" depends="core" unless="${skip.tests}" if="${not(string::contains(build.platform, 'silverlight') or build.platform == 'netcf-3.5')}">
<mkdir dir="${current.path.test}"/>
<call target="CopyDefaultTestInfrastructureAssemblies"/>

<copy todir="${current.path.test}" flatten="true" overwrite="true">
<fileset basedir="${path.lib}/Ninject.Extensions.Factory/${build.platform}">
<include name="**/*.dll"/>
<exclude name="lib/**/*.dll"/>
</fileset>
</copy>

<property name="defines" value="${build.defines},MONO_2_6" if="${teamcity}"/>
<property name="defines" value="${build.defines}" unless="${teamcity}"/>
<csc noconfig="true" warnaserror="true" target="library" debug="${build.debug}" optimize="${build.optimize}" define="${defines}"
Expand All @@ -51,6 +58,7 @@
<include name="moq.dll"/>
<include name="${product.assembly}"/>
<include name="${path.lib}/Ninject/${build.platform}/Ninject.dll"/>
<include name="${path.lib}/Ninject.Extensions.Factory/${build.platform}/Ninject.Extensions.Factory.dll"/>
</references>
<nowarn>
<warning number="1584"/>
Expand All @@ -76,6 +84,12 @@
<target name="compile-silverlight-tests" depends="core" unless="${skip.tests or skip.silverlightTests}" if="${string::contains(build.platform, 'silverlight')}">
<mkdir dir="${current.path.test}"/>
<call target="CopyDefaultTestInfrastructureAssemblies-SL"/>
<copy todir="${current.path.test}" flatten="true" overwrite="true">
<fileset basedir="${path.lib}/Ninject.Extensions.Factory/${build.platform}">
<include name="**/*.dll"/>
<exclude name="lib/**/*.dll"/>
</fileset>
</copy>

<csc noconfig="true" warnaserror="true" target="library" debug="${build.debug}" optimize="${build.optimize}" define="${build.defines}"
output="${current.path.test}/${product.assembly.silverlighttestdll}">
Expand Down Expand Up @@ -103,6 +117,7 @@
<include name="FluentAssertions.Silverlight.dll"/>
<include name="${product.assembly}"/>
<include name="${path.lib}/Ninject/${build.platform}/Ninject.dll"/>
<include name="${path.lib}/Ninject.Extensions.Factory/${build.platform}/Ninject.Extensions.Factory.dll"/>
</references>
<nowarn>
<warning number="1584"/>
Expand All @@ -113,10 +128,7 @@
<include name="*.dll" />
</fileset>
<fileset basedir="${path.src}/${product.name}.SilverlightTests">
<include name="AppManifest.xaml" if="${string::contains(build.platform, 'silverlight-4.0')}"/>
</fileset>
<fileset basedir="${path.src}/${product.name}.SilverlightTests/Silverlight3">
<include name="AppManifest.xaml" unless="${string::contains(build.platform, 'silverlight-4.0')}"/>
<include name="AppManifest.xaml"/>
</fileset>
</zip>
</target>
Expand Down
1 change: 1 addition & 0 deletions lib/Ninject.Extensions.Factory/RequiredDependency.txt
@@ -0,0 +1 @@
Add the various Ninject.Extensions.Factory platform builds here. The simplest way is to add the Zip files generated by the Ninject.Etensions.Factory release build and call the UnzipDependencies.cmd in the main folder.
Expand Up @@ -5,7 +5,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ninject.Extensions.Conventi
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ninject.Extensions.Conventions.Tests", "Ninject.Extensions.Conventions.Test\Ninject.Extensions.Conventions.Tests.csproj", "{861737AD-F1E6-4D67-9A6C-26642BA9F267}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ninject.Extensions.Conventions.SilverlightTests", "Ninject.Extensions.Conventions.SilverlightTests\Ninject.Extensions.Conventions.SilverlightTests.csproj", "{934DCAA8-F266-4B4E-B7DF-5753694539BB}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ninject.Extensions.Conventions.SilverlightTests", "Ninject.Extensions.Conventions.SilverlightTests\Ninject.Extensions.Conventions.SilverlightTests.csproj", "{28952DBF-037A-40DB-B04C-DAE58B7F330D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestPlugin", "TestPlugin\TestPlugin.csproj", "{F4A41F6B-087A-4557-B306-C6188320F290}"
EndProject
Expand All @@ -25,10 +25,10 @@ Global
{861737AD-F1E6-4D67-9A6C-26642BA9F267}.Debug|Any CPU.Build.0 = Debug|Any CPU
{861737AD-F1E6-4D67-9A6C-26642BA9F267}.Release|Any CPU.ActiveCfg = Release|Any CPU
{861737AD-F1E6-4D67-9A6C-26642BA9F267}.Release|Any CPU.Build.0 = Release|Any CPU
{934DCAA8-F266-4B4E-B7DF-5753694539BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{934DCAA8-F266-4B4E-B7DF-5753694539BB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{934DCAA8-F266-4B4E-B7DF-5753694539BB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{934DCAA8-F266-4B4E-B7DF-5753694539BB}.Release|Any CPU.Build.0 = Release|Any CPU
{28952DBF-037A-40DB-B04C-DAE58B7F330D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{28952DBF-037A-40DB-B04C-DAE58B7F330D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{28952DBF-037A-40DB-B04C-DAE58B7F330D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{28952DBF-037A-40DB-B04C-DAE58B7F330D}.Release|Any CPU.Build.0 = Release|Any CPU
{F4A41F6B-087A-4557-B306-C6188320F290}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F4A41F6B-087A-4557-B306-C6188320F290}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F4A41F6B-087A-4557-B306-C6188320F290}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
@@ -1,6 +1,6 @@
<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="Ninject.Extensions.Conventions.SilverlightTests.App"
x:Class="Ninject.Extensions.Conventions.App"
>
<Application.Resources>

Expand Down
Expand Up @@ -55,7 +55,7 @@ public void CustomInitializeComponent()
}

this.contentLoaded = true;
LoadComponent(this, new Uri("/Ninject.SilverlightTests;component/App.xaml", UriKind.Relative));
LoadComponent(this, new Uri("/Ninject.Extensions.Conventions;component/App.xaml", UriKind.Relative));
}

/// <summary>
Expand Down
Expand Up @@ -3,6 +3,8 @@
<AssemblyPart x:Name="Ninject.Extensions.Conventions.SilverlightTests" Source="Ninject.Extensions.Conventions.SilverlightTests.dll" />
<AssemblyPart x:Name="Ninject" Source="Ninject.dll" />
<AssemblyPart x:Name="Ninject.Extensions.Conventions" Source="Ninject.Extensions.Conventions.dll" />
<AssemblyPart x:Name="Castle.Core" Source="Castle.Core.dll" />
<AssemblyPart x:Name="Ninject.Extensions.Factory" Source="Ninject.Extensions.Factory.dll" />
<AssemblyPart x:Name="UnitDrivenLight" Source="UnitDrivenLight.dll" />
</Deployment.Parts>
</Deployment>
Expand Up @@ -3,9 +3,9 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{934DCAA8-F266-4B4E-B7DF-5753694539BB}</ProjectGuid>
<ProjectGuid>{28952DBF-037A-40DB-B04C-DAE58B7F330D}</ProjectGuid>
<ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
Expand All @@ -15,36 +15,23 @@
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
<SilverlightApplication>true</SilverlightApplication>
<SupportedCultures />
<SupportedCultures>
</SupportedCultures>
<XapOutputs>true</XapOutputs>
<GenerateSilverlightManifest>true</GenerateSilverlightManifest>
<XapFilename>Ninject.Extensions.Conventions.SilverlightTests.xap</XapFilename>
<SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
<SilverlightAppEntry>Ninject.Extensions.Conventions.App</SilverlightAppEntry>
<TestPageFileName>TestPage.html</TestPageFileName>
<TestPageFileName>Ninject.Extensions.Conventions.SilverlightTestsTestPage.html</TestPageFileName>
<CreateTestPage>true</CreateTestPage>
<ValidateXaml>true</ValidateXaml>
<EnableOutOfBrowser>false</EnableOutOfBrowser>
<OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
<UsePlatformExtensions>false</UsePlatformExtensions>
<ThrowErrorsInValidation>true</ThrowErrorsInValidation>
<LinkedServerProject />
<LinkedServerProject>
</LinkedServerProject>
</PropertyGroup>
<!--
//
// Silverlight Code Coverage Instrumentation
// List any libraries or assemblies that you would like to instrument during
// a code coverage pass. An example, for ClassLibrary1, is provided, and
// commented out below as a starting point:
//
-->
<!--
<ItemGroup>
<InstrumentSilverlightAssemblies Include="SilverlightClassLibrary1">
<Visible>false</Visible>
</InstrumentSilverlightAssemblies>
</ItemGroup>
-->
<!-- This property group is only here to support building this project using the
MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
to set the TargetFrameworkVersion to v3.5 -->
Expand All @@ -56,7 +43,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\build\debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;SILVERLIGHT;NO_ASSEMBLY_SCANNING;NO_SKIP_VISIBILITY</DefineConstants>
<DefineConstants>TRACE;DEBUG;SILVERLIGHT NO_ASSEMBLY_SCANNING NO_SKIP_VISIBILITY</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
Expand All @@ -74,22 +61,25 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Castle.Core">
<HintPath>..\..\tools\moq\Silverlight4\Castle.Core.dll</HintPath>
<HintPath>..\..\lib\Ninject.Extensions.Factory\silverlight-4.0\DynamicProxy\lib\Castle.Core.dll</HintPath>
</Reference>
<Reference Include="FluentAssertions.Silverlight">
<HintPath>..\..\tools\FluentAssertions\Silverlight-4.0\FluentAssertions.Silverlight.dll</HintPath>
</Reference>
<Reference Include="Moq.Silverlight">
<HintPath>..\..\tools\moq\Silverlight4\Moq.Silverlight.dll</HintPath>
</Reference>
<Reference Include="mscorlib" />
<Reference Include="Ninject">
<HintPath>..\..\lib\Ninject\silverlight-4.0\Ninject.dll</HintPath>
</Reference>
<Reference Include="Ninject.Extensions.Conventions">
<HintPath>..\..\build\silverlight-4.0\release\Ninject.Extensions.Conventions.dll</HintPath>
</Reference>
<Reference Include="Ninject.Extensions.Factory">
<HintPath>..\..\lib\Ninject.Extensions.Factory\silverlight-4.0\Ninject.Extensions.Factory.dll</HintPath>
</Reference>
<Reference Include="System.Windows" />
<Reference Include="mscorlib" />
<Reference Include="system" />
<Reference Include="System.Core" />
<Reference Include="System.Net" />
Expand Down Expand Up @@ -157,6 +147,9 @@
<Compile Include="..\Ninject.Extensions.Conventions.Test\BindingGenerators\SingleInterfaceBindingGeneratorTests.cs">
<Link>BindingGenerators\SingleInterfaceBindingGeneratorTests.cs</Link>
</Compile>
<Compile Include="..\Ninject.Extensions.Conventions.Test\BindingGenerators\TestBindingGeneratorFactory.cs">
<Link>BindingGenerators\TestBindingGeneratorFactory.cs</Link>
</Compile>
<Compile Include="..\Ninject.Extensions.Conventions.Test\Fakes\Bar.cs">
<Link>Fakes\Bar.cs</Link>
</Compile>
Expand Down Expand Up @@ -262,6 +255,15 @@
<Compile Include="..\Ninject.Extensions.Conventions.Test\IntegrationTests\AssemblyLoadingTests.cs">
<Link>IntegrationTests\AssemblyLoadingTests.cs</Link>
</Compile>
<Compile Include="..\Ninject.Extensions.Conventions.Test\IntegrationTests\ConfigurationTests.cs">
<Link>IntegrationTests\ConfigurationTests.cs</Link>
</Compile>
<Compile Include="..\Ninject.Extensions.Conventions.Test\IntegrationTests\FactoryTests.cs">
<Link>IntegrationTests\FactoryTests.cs</Link>
</Compile>
<Compile Include="..\Ninject.Extensions.Conventions.Test\IntegrationTests\InterfaceSegregationTests.cs">
<Link>IntegrationTests\InterfaceSegregationTests.cs</Link>
</Compile>
<Compile Include="..\Ninject.Extensions.Conventions.Test\IntegrationTests\NonePublicTypesTests.cs">
<Link>IntegrationTests\NonePublicTypesTests.cs</Link>
</Compile>
Expand All @@ -271,6 +273,9 @@
<Compile Include="..\Ninject.Extensions.Conventions.Test\IntegrationTests\OpenGenericClassBindingTests.cs">
<Link>IntegrationTests\OpenGenericClassBindingTests.cs</Link>
</Compile>
<Compile Include="..\Ninject.Extensions.Conventions.Test\IntegrationTests\SpecialConfigurations.cs">
<Link>IntegrationTests\SpecialConfigurations.cs</Link>
</Compile>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
</Compile>
Expand All @@ -285,9 +290,15 @@
<ItemGroup>
<None Include="Properties\AppManifest.xml" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
<Import Condition="$(SilverlightVersion)=='v3.0'" Project="$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SilverlightToolkit\Tools\v3.0)Microsoft.Silverlight.Toolkit.Build.targets" />
<Import Condition="$(SilverlightVersion)=='v4.0'" Project="$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SilverlightToolkit\Tools\v4.0)Microsoft.Silverlight.Toolkit.Build.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>
-->
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
Expand Down
Expand Up @@ -3,5 +3,4 @@
>
<Deployment.Parts>
</Deployment.Parts>

</Deployment>
@@ -1,34 +1,16 @@
//-------------------------------------------------------------------------------
// <copyright file="AssemblyInfo.cs" company="bbv Software Services AG">
// Copyright (c) 2010 bbv Software Services AG
// Author: Remo Gloor remo.gloor@bbv.ch
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
//-------------------------------------------------------------------------------

using System.Reflection;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Ninject.Extensions.Conventions.SilverlightTests")]
[assembly: AssemblyTitle("Ninject.Extensions.Conventions.SilverlightTests2")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("bbv Software Services AG")]
[assembly: AssemblyProduct("Ninject.Extensions.Conventions.SilverlightTests")]
[assembly: AssemblyCopyright("Copyright © bbv Software Services AG 2010")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Ninject.Extensions.Conventions.SilverlightTests2")]
[assembly: AssemblyCopyright("Copyright © 2011")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -38,7 +20,7 @@
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("ead39e75-676b-4213-be00-b8483be87d8f")]
[assembly: Guid("25ff8fd3-0a76-498e-ad29-dcbc67c5249c")]

// Version information for an assembly consists of the following four values:
//
Expand All @@ -50,4 +32,4 @@
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

This file was deleted.

This file was deleted.

0 comments on commit 84c346e

Please sign in to comment.