Permalink
Browse files

Upgraded Castle to 2.5.1

  • Loading branch information...
1 parent a432abf commit 33afe0a8437dcf202c2f55bdd96ff4ef66686594 Graham Hay committed Sep 30, 2010
View
11 build/dependencymanager.proj
@@ -22,16 +22,19 @@
<HintPath>$(CastleDirectory)\Castle.Core.dll</HintPath>
<SpecificVersion>false</SpecificVersion>
</Reference>
- <Reference Include="Castle.MicroKernel">
- <HintPath>$(CastleDirectory)\Castle.MicroKernel.dll</HintPath>
- <SpecificVersion>false</SpecificVersion>
- </Reference>
<Reference Include="Castle.Windsor">
<HintPath>$(CastleDirectory)\Castle.Windsor.dll</HintPath>
<SpecificVersion>false</SpecificVersion>
</Reference>
</ItemGroup>
+ <ItemGroup Condition="'$(CastleWindsor)' != '2.5.1'">
+ <Reference Include="Castle.MicroKernel">
+ <HintPath>$(CastleDirectory)\Castle.MicroKernel.dll</HintPath>
+ <SpecificVersion>false</SpecificVersion>
+ </Reference>
+ </ItemGroup>
+
<PropertyGroup>
<OpenRastaAssemblyPath Condition="'$(OpenRastaDirectory)' != '' And '$(OpenRasta)' != ''">$(OpenRastaDirectory)\OpenRasta.dll</OpenRastaAssemblyPath>
<OpenRasta-Hosting-AspNet-AssemblyPath Condition="'$(OpenRastaDirectory)' != '' And '$(OpenRasta-AspNet)' != ''">$(OpenRastaDirectory)\OpenRasta.Hosting.AspNet.dll</OpenRasta-Hosting-AspNet-AssemblyPath>
View
BIN lib/castle-2.5.1/Castle.Core.dll
Binary file not shown.
View
BIN lib/castle-2.5.1/Castle.Core.pdb
Binary file not shown.
View
4,919 lib/castle-2.5.1/Castle.Core.xml
4,919 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
BIN lib/castle-2.5.1/Castle.Windsor.dll
Binary file not shown.
View
BIN lib/castle-2.5.1/Castle.Windsor.pdb
Binary file not shown.
View
8,612 lib/castle-2.5.1/Castle.Windsor.xml
8,612 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
2 src/CommonInfo.cs
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
-// Runtime Version:2.0.50727.4927
+// Runtime Version:2.0.50727.3615
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
View
12 src/castle/OpenRasta.DI.Windsor.Tests.Unit/OpenRasta.DI.Windsor.Tests.Unit.csproj
@@ -29,17 +29,13 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
- <Reference Include="Castle.Core, Version=1.1.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
+ <Reference Include="Castle.Core, Version=2.5.1.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\lib\castle-2.0\Castle.Core.dll</HintPath>
+ <HintPath>..\..\..\lib\castle-2.5.1\Castle.Core.dll</HintPath>
</Reference>
- <Reference Include="Castle.MicroKernel, Version=2.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
+ <Reference Include="Castle.Windsor, Version=2.5.1.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\lib\castle-2.0\Castle.MicroKernel.dll</HintPath>
- </Reference>
- <Reference Include="Castle.Windsor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\lib\castle-2.0\Castle.Windsor.dll</HintPath>
+ <HintPath>..\..\..\lib\castle-2.5.1\Castle.Windsor.dll</HintPath>
</Reference>
<Reference Include="Moq, Version=2.6.3127.18174, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
View
4 src/castle/OpenRasta.DI.Windsor/ContextStoreLifetime.cs
@@ -1,5 +1,9 @@
using System;
+#if CASTLE_20
+using Castle.MicroKernel.Context;
+#else
using Castle.MicroKernel;
+#endif
using Castle.MicroKernel.Lifestyle;
using OpenRasta.DI.Internal;
using OpenRasta.Pipeline;
View
11 src/castle/OpenRasta.DI.Windsor/WindsorDependencyResolver.cs
@@ -21,6 +21,7 @@
using OpenRasta.Pipeline;
#if CASTLE_20
using Castle.MicroKernel.Registration;
+using Castle.MicroKernel.Context;
#endif
namespace OpenRasta.DI.Windsor
@@ -71,7 +72,12 @@ protected override IEnumerable<TService> ResolveAllCore<TService>()
foreach (var handler in AvailableHandlers(handlers))
try
{
+#if CASTLE_20
+ resolved.Add((TService)_windsorContainer.Resolve(handler.ComponentModel.Name, typeof(TService)));
+#else
resolved.Add((TService) _windsorContainer.Resolve(handler.ComponentModel.Name));
+#endif
+
}
catch
{
@@ -135,8 +141,11 @@ protected override void AddDependencyInstanceCore(Type serviceType, object insta
component.CustomComponentActivator = typeof (ContextStoreInstanceActivator);
component.ExtendedProperties[Constants.REG_IS_INSTANCE_KEY] = true;
component.Name = component.Name;
-
+#if CASTLE_20
+ _windsorContainer.Kernel.Register(Component.For(component));
+#else
_windsorContainer.Kernel.AddCustomComponent(component);
+#endif
store[component.Name] = instance;
}
}
View
2 src/castle/OpenRasta.DI.Windsor/dependencies.targets
@@ -3,7 +3,7 @@
<PropertyGroup>
<RootPath Condition="'$(RootPath)' == ''">$(MSBuildProjectDirectory)\..\..\..</RootPath>
- <CastleWindsor>2.0</CastleWindsor>
+ <CastleWindsor>2.5.1</CastleWindsor>
<OpenRasta>2.0</OpenRasta>
</PropertyGroup>
<Import Project="$(RootPath)\Build\dependencymanager.proj"/>

0 comments on commit 33afe0a

Please sign in to comment.