Skip to content

Commit

Permalink
Merge branch 'readonlykernel'
Browse files Browse the repository at this point in the history
Conflicts:
	Ninject.build
	Ninject.include
	src/Ninject/Activation/Pipeline.cs
	src/Ninject/Activation/Providers/StandardProvider.cs
	src/Ninject/KernelBase.cs
	src/Ninject/Modules/CompiledModuleLoaderPlugin.cs
	src/Ninject/Planning/Directives/ConstructorInjectionDirective.cs
	src/Ninject/Planning/IPlan.cs
	src/Ninject/Planning/Plan.cs
	src/Ninject/Planning/Strategies/ConstructorReflectionStrategy.cs
	src/Ninject/Selection/Heuristics/StandardConstructorScorer.cs
	src/Ninject/Syntax/BindingRoot.cs
	src/Ninject/Syntax/ResolutionExtensions.cs
	tools/nant/NAnt.exe.config
  • Loading branch information
scott-xu committed Jun 6, 2015
2 parents e94cbae + d5d884f commit d115ead
Show file tree
Hide file tree
Showing 105 changed files with 5,959 additions and 5,510 deletions.
8 changes: 2 additions & 6 deletions HowToBuild.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
If you are trying to build for a particular platform, please download and install the respective SDKs:
.NET Compact Framework 3.5, you need .NET Compact Framework 3.5 Redistributable - http://www.microsoft.com/downloads/details.aspx?FamilyID=e3821449-3c6b-42f1-9fd9-0041345b3385
Microsoft� Silverlight� 2 SDK: http://www.microsoft.com/downloads/details.aspx?FamilyID=8d933343-038f-499c-986c-c3c7e87a60b3
Microsoft� Silverlight� 3 SDK: http://www.microsoft.com/downloads/details.aspx?FamilyID=1ea49236-0de7-41b1-81c8-a126ff39975b
Microsoft� Silverlight� 4 SDK: http://www.microsoft.com/download/en/details.aspx?id=7335
Microsoft� Silverlight� 5 SDK: http://www.microsoft.com/download/en/details.aspx?id=28359
Microsoft� Silverlight� 5 Runtime: Download depending on your OS from: http://www.silverlight.net/downloads - End-User Runtime is sufficient, though the Developer Runtime will work as well.
Microsoft� Windows Phone SDK 7.1: http://www.microsoft.com/download/en/details.aspx?id=27570
Mono 2.X : http://www.go-mono.com/mono-downloads/download.html
Microsoft� Windows Phone SDK 8: http://www.microsoft.com/en-us/download/details.aspx?id=35471
Mono 3.X : http://www.go-mono.com/mono-downloads/download.html

If you like to work with the "Ninject with Silverlight and WP7 Unittesting.sln" Visual Studio Solution you additionally have to install the following:
Microsoft� Silverlight� 5 Tools for VS2010 SP1: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=28358
Expand Down
39 changes: 13 additions & 26 deletions Ninject.build
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
<property name="version" value="0.0.0.0" overwrite="true"/>
<property name="product.name" value="Ninject" overwrite="false"/>
<property name="product.company" value="Ninject Project Contributors" overwrite="false"/>
<property name="product.duration" value="2007-2012" overwrite="false"/>
<property name="product.duration" value="2007-2014" overwrite="false"/>
<property name="product.description" value="Lightweight dependency injection for .NET" overwrite="false"/>
<property name="product.platforms" value="net-4.5,net-3.5-client,net-4.0-client,net-4.5,net-3.5_medium_trust,net-4.0_medium_trust,net-4.5_medium_trust,silverlight-5.0,silverlight-4.0,silverlight-3.0,silverlight-2.0,silverlight-4.0-wp71,silverlight-4.0-wp7,mono-3.5,mono-4.0,netcf-3.5" overwrite="false"/>
<property name="product.buildserverPlatforms" value="net-3.5-client,net-4.0-client,net-3.5_medium_trust,net-4.0_medium_trust,silverlight-5.0,silverlight-4.0,silverlight-3.0,silverlight-2.0,mono-3.5,mono-4.0,netcf-3.5" overwrite="false"/>
<property name="product.platforms" value="net-4.5,net-4.0-client,net-4.5,net-4.0_medium_trust,net-4.5_medium_trust,silverlight-5.0,mono-4.0" overwrite="false"/>
<property name="product.buildserverPlatforms" value="net-4.0-client,net-4.0_medium_trust,silverlight-5.0,mono-4.0" overwrite="false"/>
<property name="dependencies" value="" overwrite="false"/>

<property name="product.assembly.testmodule" value="${product.name}.Tests.TestModule.dll" overwrite="false"/>
<property name="product.assembly.testassembly" value="${product.name}.Tests.TestAssembly.dll" overwrite="false"/>
<property name="current.path.testmodules" value="${path.build}/${build.platform}/tests/TestModules" dynamic="true"/>
<property name="current.path.testmodules" value="${path.build}/${build.platform}/tests/TestModules" dynamic="true"/>

<include buildfile="Ninject.include" />
<target name="all" depends="core csl test silverlight-test"/>
Expand All @@ -20,8 +20,7 @@
<target name="core" depends="init">
<csc noconfig="true" warnaserror="true" target="library" debug="${build.debug}" optimize="${build.optimize}" define="${build.defines}" output="${current.path.build}/${product.assembly}" doc="${current.path.build}/${product.docfile}" keyfile="${path.src}/${product.keyfile}">
<arg line="/filealign:512"/>
<arg value="-sdk:2" if="${string::contains(build.platform, 'mono-3.5')}"/>
<arg value="-sdk:4" if="${string::contains(build.platform, 'mono-4.0')}"/>
<arg line="/sdk:4.0" if="${string::contains(build.platform, 'mono-4.0')}"/>
<sources basedir="${path.src}">
<include name="${build.asminfo}"/>
<include name="${product.name}/**/*.cs"/>
Expand All @@ -30,7 +29,6 @@
<include name="mscorlib.dll"/>
<include name="System.dll"/>
<include name="System.Core.dll"/>
<include name="${path.lib}/System.Linq.dll" if="${string::contains(build.platform, 'wp7') and not(string::contains(build.platform, 'wp71'))}"/>
</references>
<nowarn>
<warning number="1711"/>
Expand All @@ -43,9 +41,8 @@
<mkdir dir="${current.path.build.extensions}" if="${not(directory::exists(current.path.build.extensions))}"/>

<csc noconfig="true" warnaserror="true" target="library" debug="${build.debug}" optimize="${build.optimize}" define="${build.defines}" output="${current.path.build.extensions}/CommonServiceLocator.NinjectAdapter.dll">
<arg line="/filealign:512"/>
<arg value="-sdk:2" if="${string::contains(build.platform, 'mono-3.5')}"/>
<arg value="-sdk:4" if="${string::contains(build.platform, 'mono-4.0')}"/>
<arg line="/filealign:512"/>
<arg line="/sdk:4.0" if="${string::contains(build.platform, 'mono-4.0')}"/>
<sources basedir="${path.src}">
<include name="${build.asminfo}"/>
<include name="CommonServiceLocator.NinjectAdapter/**/*.cs"/>
Expand Down Expand Up @@ -98,7 +95,7 @@
</csc>
</target>

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

Expand All @@ -108,7 +105,7 @@
<include name="test.bar"/>
</fileset>
</copy>
<csc noconfig="true" nostdlib="true" warnaserror="true" target="library" debug="${build.debug}" optimize="${build.optimize}" define="${build.defines}"
<csc noconfig="true" nostdlib="true" warnaserror="false" target="library" debug="${build.debug}" optimize="${build.optimize}" define="${build.defines}"
output="${current.path.test}/${product.assembly.test}">
<sources basedir="${path.src}">
<include name="${product.name}.Test/**/*.cs"/>
Expand All @@ -135,7 +132,7 @@
<mkdir dir="${current.path.test}"/>
<call target="CopyDefaultTestInfrastructureAssemblies-SL"/>

<csc noconfig="true" warnaserror="true" target="library" debug="${build.debug}" optimize="${build.optimize}" define="${build.defines}"
<csc noconfig="true" warnaserror="false" target="library" debug="${build.debug}" optimize="${build.optimize}" define="${build.defines}"
output="${current.path.test}/${product.assembly.silverlighttestdll}">
<sources basedir="${path.src}">
<include name="${product.name}.Test/*.cs"/>
Expand All @@ -152,12 +149,8 @@
<include name="System.Windows.dll"/>
<include name="System.Windows.Browser.dll"/>
<include name="System.Net.dll"/>
<include name="Microsoft.Phone.dll" if="${string::contains(build.platform, 'wp7')}"/>
<include name="Microsoft.Phone.Interop.dll" if="${string::contains(build.platform, 'wp7')}"/>
<include name="Moq.Silverlight.dll" unless="${string::contains(build.platform, 'wp7')}"/>
<include name="Castle.Core.dll" if="${string::contains(build.platform, 'silverlight-4.0') or string::contains(build.platform, 'silverlight-5.0')}"/>
<include name="Castle.Core-Silverlight.dll" unless="${string::contains(build.platform, 'silverlight-4.0') or string::contains(build.platform, 'silverlight-5.0')}"/>
<include name="Castle.DynamicProxy-Silverlight.dll" unless="${build.platform == 'silverlight-4.0' or build.platform == 'silverlight-5.0'}"/>
<include name="Moq.Silverlight.dll" />
<include name="Castle.Core.dll" />
<include name="FluentAssertions.Silverlight.dll"/>
<include name="xunit.runner.silverlight.dll"/>
<include name="xunit-silverlight.dll"/>
Expand All @@ -173,14 +166,8 @@
<include name="*.dll" />
<exclude name="CommonServiceLocator.NinjectAdapter.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')}"/>
</fileset>
<fileset basedir="${path.lib}">
<include name="System.Linq.dll" if="${string::contains(build.platform, 'wp7') and not(string::contains(build.platform, 'wp71'))}"/>
<include name="AppManifest.xaml"/>
</fileset>
</zip>
</target>
Expand Down
101 changes: 8 additions & 93 deletions Ninject.include
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
<property name="build.version" value="${version.major}.${version.minor}.${version.build}.${version.revision}" dynamic="true"/>
<property name="build.assemblyversion" value="${version.major}.${version.minor}.0.0" dynamic="true"/>
<property name="build.config" value="debug" overwrite="false"/>
<property name="build.platform" value="net-3.5" overwrite="true"/>
<property name="build.target" value="net-3.5" overwrite="false"/>
<property name="build.platform" value="net-4.0" overwrite="true"/>
<property name="build.target" value="net-4.0" overwrite="false"/>
<property name="build.asminfo" value="SharedAssemblyInfo.cs"/>

<property name="OsMajorVersion" value="${version::get-major(operating-system::get-version(environment::get-operating-system()))}" dynamic="true" />
Expand Down Expand Up @@ -147,7 +147,7 @@
<attribute type="AssemblyCompanyAttribute" value="${product.company}"/>
<attribute type="AssemblyCopyrightAttribute" value="Copyright © ${product.duration} ${product.company} and contributors"/>
<attribute type="AssemblyVersionAttribute" value="${build.assemblyversion}"/>
<attribute type="AssemblyFileVersionAttribute" value="${build.version}" unless="${build.platform == 'netcf-3.5'}"/>
<attribute type="AssemblyFileVersionAttribute" value="${build.version}" />
<attribute type="ComVisibleAttribute" value="false"/>
<attribute type="CLSCompliantAttribute" value="true" if="${product.clsCompliant}"/>
</attributes>
Expand Down Expand Up @@ -211,32 +211,6 @@
<property name="global.build.defines" value="TRACE,STRONG"/>
</target>

<target name="config-platform-net-3.5-client">
<property name="nant.settings.currentframework" value="net-3.5-client"/>
<property name="build.defines" value="${global.build.defines},NET,NET_35"/>
<property name="nuget.platform" value="net35"/>
<property name="nuget.add" value="true"/>
<property name="build.platform" value="net-3.5" overwrite="true"/>
<property name="path.tools.xunit.console" value="${path.tools.xunit}/xunit.console.exe" dynamic="true"/>
</target>

<target name="config-platform-net-3.5">
<property name="nant.settings.currentframework" value="net-3.5"/>
<property name="build.defines" value="${global.build.defines},NET,NET_35"/>
<property name="nuget.platform" value="net35-full"/>
<property name="nuget.add" value="true"/>
<property name="build.platform" value="net-3.5" overwrite="true"/>
<property name="path.tools.xunit.console" value="${path.tools.xunit}/xunit.console.exe" dynamic="true"/>
</target>

<target name="config-platform-net-3.5_medium_trust">
<property name="nant.settings.currentframework" value="net-3.5-client"/>
<property name="build.defines" value="${global.build.defines},NET,NET_35,MEDIUM_TRUST"/>
<property name="nuget.add" value="false"/>
<property name="build.platform" value="net-3.5_medium_trust" overwrite="true"/>
<property name="path.tools.xunit.console" value="${path.tools.xunit}/xunit.console.exe" dynamic="true"/>
</target>

<target name="config-platform-net-4.0-client">
<property name="nant.settings.currentframework" value="net-4.0-client"/>
<property name="build.defines" value="${global.build.defines},NET,NET_40,NO_PARTIAL_TRUST"/>
Expand Down Expand Up @@ -289,30 +263,6 @@
<property name="build.platform" value="net-4.5" overwrite="true"/>
</target>

<target name="config-platform-silverlight-2.0">
<property name="nant.settings.currentframework" value="silverlight-2.0"/>
<property name="build.defines" value="${global.build.defines},SILVERLIGHT,SILVERLIGHT_20,NO_ASSEMBLY_SCANNING,NO_PARTIAL_TRUST,NO_SKIP_VISIBILITY,NO_EXCEPTION_SERIALIZATION,NO_DEBUG_SYMBOLS"/>
<property name="nuget.platform" value="sl2"/>
<property name="nuget.add" value="true"/>
<property name="build.platform" value="silverlight-2.0" overwrite="true"/>
</target>

<target name="config-platform-silverlight-3.0">
<property name="nant.settings.currentframework" value="silverlight-3.0"/>
<property name="build.defines" value="${global.build.defines},SILVERLIGHT,SILVERLIGHT_30,NO_ASSEMBLY_SCANNING,NO_PARTIAL_TRUST,NO_SKIP_VISIBILITY,NO_EXCEPTION_SERIALIZATION,NO_DEBUG_SYMBOLS"/>
<property name="nuget.platform" value="sl3"/>
<property name="nuget.add" value="true"/>
<property name="build.platform" value="silverlight-3.0" overwrite="true"/>
</target>

<target name="config-platform-silverlight-4.0">
<property name="nant.settings.currentframework" value="silverlight-4.0"/>
<property name="build.defines" value="${global.build.defines},SILVERLIGHT,SILVERLIGHT_40,NO_ASSEMBLY_SCANNING,NO_PARTIAL_TRUST,NO_SKIP_VISIBILITY,NO_EXCEPTION_SERIALIZATION,NO_DEBUG_SYMBOLS,NO_PARTIAL_TRUST"/>
<property name="nuget.platform" value="sl4"/>
<property name="nuget.add" value="true"/>
<property name="build.platform" value="silverlight-4.0" overwrite="true"/>
</target>

<target name="config-platform-silverlight-5.0">
<property name="nant.settings.currentframework" value="silverlight-5.0"/>
<property name="build.defines" value="${global.build.defines},SILVERLIGHT,SILVERLIGHT_50,NO_ASSEMBLY_SCANNING,NO_PARTIAL_TRUST,NO_SKIP_VISIBILITY,NO_EXCEPTION_SERIALIZATION,NO_DEBUG_SYMBOLS,NO_PARTIAL_TRUST"/>
Expand All @@ -321,36 +271,6 @@
<property name="build.platform" value="silverlight-5.0" overwrite="true"/>
</target>

<target name="config-platform-silverlight-4.0-wp7">
<property name="nant.settings.currentframework" value="silverlight-wp7"/>
<property name="build.defines" value="${global.build.defines},SILVERLIGHT,SILVERLIGHT_40,WINDOWS_PHONE,NO_LCG,NO_ASSEMBLY_SCANNING,NO_PARTIAL_TRUST,NO_SKIP_VISIBILITY,NO_EXCEPTION_SERIALIZATION,NO_DEBUG_SYMBOLS,NO_MOQ"/>
<property name="nuget.platform" value="sl3-wp"/>
<property name="nuget.add" value="true"/>
<property name="build.platform" value="silverlight-4.0-wp7" overwrite="true"/>
</target>

<target name="config-platform-silverlight-4.0-wp71">
<property name="nant.settings.currentframework" value="silverlight-wp71"/>
<property name="build.defines" value="${global.build.defines},SILVERLIGHT,SILVERLIGHT_40,WINDOWS_PHONE,NO_LCG,NO_ASSEMBLY_SCANNING,NO_PARTIAL_TRUST,NO_SKIP_VISIBILITY,NO_EXCEPTION_SERIALIZATION,NO_DEBUG_SYMBOLS,NO_MOQ"/>
<property name="nuget.platform" value="sl4-windowsphone71"/>
<property name="nuget.add" value="true"/>
<property name="build.platform" value="silverlight-4.0-wp71" overwrite="true"/>
</target>

<target name="config-platform-netcf-3.5">
<property name="nant.settings.currentframework" value="netcf-3.5"/>
<property name="build.defines" value="${global.build.defines},NETCF,NETCF_35,NO_LCG,NO_ASSEMBLY_SCANNING,NO_PARTIAL_TRUST,NO_EXCEPTION_SERIALIZATION,NO_DEBUG_SYMBOLS"/>
<property name="nuget.add" value="false"/>
<property name="build.platform" value="netcf-3.5" overwrite="true"/>
</target>

<target name="config-platform-mono-3.5">
<property name="nant.settings.currentframework" value="mono-3.5"/>
<property name="build.defines" value="${global.build.defines},NET,NET_35,MONO,MONO_35,NO_GENERIC_MOQ" />
<property name="nuget.add" value="false"/>
<property name="build.platform" value="mono-3.5" overwrite="true"/>
</target>

<target name="config-platform-mono-4.0">
<property name="nant.settings.currentframework" value="mono-4.0"/>
<property name="build.defines" value="${global.build.defines},NET,NET_40,MONO,MONO_40,NO_GENERIC_MOQ" />
Expand All @@ -359,7 +279,7 @@
<property name="path.tools.xunit.console" value="${path.tools.xunit}/xunit.console.clr4.exe"/>
</target>

<target name="test" depends="compile-tests" unless="${skip.tests}" if="${not(string::contains(build.platform, 'silverlight') or build.platform == 'netcf-3.5')}">
<target name="test" depends="compile-tests" unless="${skip.tests}" if="${not(string::contains(build.platform, 'silverlight'))}">
<exec
program="${path.tools.xunit.console}"
workingdir="${current.path.test}"
Expand Down Expand Up @@ -691,8 +611,8 @@
<include name="FluentAssertions.dll"/>
</fileset>
</copy>
<copy todir="${target}" unless="${string::contains(build.platform, 'net-4.0')}">
<fileset basedir="${path.tools.fluentassertions}/Net-3.5">
<copy todir="${target}" if="${string::contains(build.platform, 'mono-4.')}">
<fileset basedir="${path.tools.fluentassertions}/mono-2.0">
<include name="FluentAssertions.dll"/>
</fileset>
</copy>
Expand All @@ -704,11 +624,6 @@
</target>

<target name="CopyMoq-Target">
<copy todir="${target}" if="${not(string::contains(build.platform, 'net-4.')) and not(string::contains(build.platform, 'mono-4.'))}">
<fileset basedir="${path.tools.moq}/net35">
<include name="Moq.dll"/>
</fileset>
</copy>
<copy todir="${target}" if="${string::contains(build.platform, 'net-4.') or string::contains(build.platform, 'mono-4.')}">
<fileset basedir="${path.tools.moq}/net40">
<include name="Moq.dll"/>
Expand Down Expand Up @@ -749,13 +664,13 @@
</target>

<target name="CopyMoq-SL-Target">
<copy todir="${target}" if="${string::contains(build.platform, 'silverlight-4.0') or string::contains(build.platform, 'silverlight-5.0')}">
<copy todir="${target}" if="${string::contains(build.platform, 'silverlight-5.0')}">
<fileset basedir="${path.tools.moq}/silverlight4">
<include name="Moq.Silverlight.dll"/>
<include name="Castle.Core.dll"/>
</fileset>
</copy>
<copy todir="${target}" unless="${string::contains(build.platform, 'silverlight-4.0') or string::contains(build.platform, 'silverlight-5.0')}">
<copy todir="${target}" unless="${string::contains(build.platform, 'silverlight-5.0')}">
<fileset basedir="${path.tools.moq}/silverlight3">
<include name="Moq.Silverlight.dll"/>
<include name="Castle.Core-Silverlight.dll"/>
Expand Down
Loading

0 comments on commit d115ead

Please sign in to comment.