Skip to content

Commit

Permalink
Upgraded Castle to 2.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Graham Hay committed Sep 30, 2010
1 parent a432abf commit 33afe0a
Show file tree
Hide file tree
Showing 12 changed files with 13,558 additions and 15 deletions.
11 changes: 7 additions & 4 deletions build/dependencymanager.proj
Expand Up @@ -22,16 +22,19 @@
<HintPath>$(CastleDirectory)\Castle.Core.dll</HintPath> <HintPath>$(CastleDirectory)\Castle.Core.dll</HintPath>
<SpecificVersion>false</SpecificVersion> <SpecificVersion>false</SpecificVersion>
</Reference> </Reference>
<Reference Include="Castle.MicroKernel">
<HintPath>$(CastleDirectory)\Castle.MicroKernel.dll</HintPath>
<SpecificVersion>false</SpecificVersion>
</Reference>
<Reference Include="Castle.Windsor"> <Reference Include="Castle.Windsor">
<HintPath>$(CastleDirectory)\Castle.Windsor.dll</HintPath> <HintPath>$(CastleDirectory)\Castle.Windsor.dll</HintPath>
<SpecificVersion>false</SpecificVersion> <SpecificVersion>false</SpecificVersion>
</Reference> </Reference>
</ItemGroup> </ItemGroup>


<ItemGroup Condition="'$(CastleWindsor)' != '2.5.1'">
<Reference Include="Castle.MicroKernel">
<HintPath>$(CastleDirectory)\Castle.MicroKernel.dll</HintPath>
<SpecificVersion>false</SpecificVersion>
</Reference>
</ItemGroup>

<PropertyGroup> <PropertyGroup>
<OpenRastaAssemblyPath Condition="'$(OpenRastaDirectory)' != '' And '$(OpenRasta)' != ''">$(OpenRastaDirectory)\OpenRasta.dll</OpenRastaAssemblyPath> <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> <OpenRasta-Hosting-AspNet-AssemblyPath Condition="'$(OpenRastaDirectory)' != '' And '$(OpenRasta-AspNet)' != ''">$(OpenRastaDirectory)\OpenRasta.Hosting.AspNet.dll</OpenRasta-Hosting-AspNet-AssemblyPath>
Expand Down
Binary file added lib/castle-2.5.1/Castle.Core.dll
Binary file not shown.
Binary file added lib/castle-2.5.1/Castle.Core.pdb
Binary file not shown.
4,919 changes: 4,919 additions & 0 deletions lib/castle-2.5.1/Castle.Core.xml

Large diffs are not rendered by default.

Binary file added lib/castle-2.5.1/Castle.Windsor.dll
Binary file not shown.
Binary file added lib/castle-2.5.1/Castle.Windsor.pdb
Binary file not shown.
8,612 changes: 8,612 additions & 0 deletions lib/castle-2.5.1/Castle.Windsor.xml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/CommonInfo.cs
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // 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 // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
Expand Down
Expand Up @@ -29,17 +29,13 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <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> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\lib\castle-2.0\Castle.Core.dll</HintPath> <HintPath>..\..\..\lib\castle-2.5.1\Castle.Core.dll</HintPath>
</Reference> </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> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\lib\castle-2.0\Castle.MicroKernel.dll</HintPath> <HintPath>..\..\..\lib\castle-2.5.1\Castle.Windsor.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>
</Reference> </Reference>
<Reference Include="Moq, Version=2.6.3127.18174, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL"> <Reference Include="Moq, Version=2.6.3127.18174, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
Expand Down
4 changes: 4 additions & 0 deletions src/castle/OpenRasta.DI.Windsor/ContextStoreLifetime.cs
@@ -1,5 +1,9 @@
using System; using System;
#if CASTLE_20
using Castle.MicroKernel.Context;
#else
using Castle.MicroKernel; using Castle.MicroKernel;
#endif
using Castle.MicroKernel.Lifestyle; using Castle.MicroKernel.Lifestyle;
using OpenRasta.DI.Internal; using OpenRasta.DI.Internal;
using OpenRasta.Pipeline; using OpenRasta.Pipeline;
Expand Down
11 changes: 10 additions & 1 deletion src/castle/OpenRasta.DI.Windsor/WindsorDependencyResolver.cs
Expand Up @@ -21,6 +21,7 @@
using OpenRasta.Pipeline; using OpenRasta.Pipeline;
#if CASTLE_20 #if CASTLE_20
using Castle.MicroKernel.Registration; using Castle.MicroKernel.Registration;
using Castle.MicroKernel.Context;
#endif #endif


namespace OpenRasta.DI.Windsor namespace OpenRasta.DI.Windsor
Expand Down Expand Up @@ -71,7 +72,12 @@ protected override IEnumerable<TService> ResolveAllCore<TService>()
foreach (var handler in AvailableHandlers(handlers)) foreach (var handler in AvailableHandlers(handlers))
try try
{ {
#if CASTLE_20
resolved.Add((TService)_windsorContainer.Resolve(handler.ComponentModel.Name, typeof(TService)));
#else
resolved.Add((TService) _windsorContainer.Resolve(handler.ComponentModel.Name)); resolved.Add((TService) _windsorContainer.Resolve(handler.ComponentModel.Name));
#endif

} }
catch catch
{ {
Expand Down Expand Up @@ -135,8 +141,11 @@ protected override void AddDependencyInstanceCore(Type serviceType, object insta
component.CustomComponentActivator = typeof (ContextStoreInstanceActivator); component.CustomComponentActivator = typeof (ContextStoreInstanceActivator);
component.ExtendedProperties[Constants.REG_IS_INSTANCE_KEY] = true; component.ExtendedProperties[Constants.REG_IS_INSTANCE_KEY] = true;
component.Name = component.Name; component.Name = component.Name;

#if CASTLE_20
_windsorContainer.Kernel.Register(Component.For(component));
#else
_windsorContainer.Kernel.AddCustomComponent(component); _windsorContainer.Kernel.AddCustomComponent(component);
#endif
store[component.Name] = instance; store[component.Name] = instance;
} }
} }
Expand Down
2 changes: 1 addition & 1 deletion src/castle/OpenRasta.DI.Windsor/dependencies.targets
Expand Up @@ -3,7 +3,7 @@


<PropertyGroup> <PropertyGroup>
<RootPath Condition="'$(RootPath)' == ''">$(MSBuildProjectDirectory)\..\..\..</RootPath> <RootPath Condition="'$(RootPath)' == ''">$(MSBuildProjectDirectory)\..\..\..</RootPath>
<CastleWindsor>2.0</CastleWindsor> <CastleWindsor>2.5.1</CastleWindsor>
<OpenRasta>2.0</OpenRasta> <OpenRasta>2.0</OpenRasta>
</PropertyGroup> </PropertyGroup>
<Import Project="$(RootPath)\Build\dependencymanager.proj"/> <Import Project="$(RootPath)\Build\dependencymanager.proj"/>
Expand Down

0 comments on commit 33afe0a

Please sign in to comment.