-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from dbones/master
0.4.x
- Loading branch information
Showing
32 changed files
with
963 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{1D0F1178-5D7F-4C3D-9267-2A33C7527B86}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>Aspects.Windsor</RootNamespace> | ||
<AssemblyName>Aspects.Windsor</AssemblyName> | ||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
</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="Boxes.Core"> | ||
<HintPath>..\packages\Boxes.Core.0.4.31\lib\net40\Boxes.Core.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="Boxes.Integration"> | ||
<HintPath>..\packages\Boxes.Integration.0.4.24\lib\net40\Boxes.Integration.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="Boxes.Windsor"> | ||
<HintPath>..\packages\Boxes.Windsor.0.4.25\lib\net40\Boxes.Windsor.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="Castle.Core"> | ||
<HintPath>..\packages\Castle.Core.3.2.0\lib\net45\Castle.Core.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="Castle.Windsor"> | ||
<HintPath>..\packages\Castle.Windsor.3.2.1\lib\net45\Castle.Windsor.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="Microsoft.CSharp" /> | ||
<Reference Include="System.Xml" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Extensions.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="packages.config" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\Aspects\Aspects.csproj"> | ||
<Project>{c6a4783c-22e9-4dba-8184-9ef2c7cf604a}</Project> | ||
<Name>Aspects</Name> | ||
<Private>False</Private> | ||
</ProjectReference> | ||
<ProjectReference Include="..\Identifiers\Identifiers.csproj"> | ||
<Project>{5F873342-D9A3-49AD-9398-3391350C124A}</Project> | ||
<Name>Identifiers</Name> | ||
<Private>False</Private> | ||
</ProjectReference> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Content Include="manifest.xml"> | ||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> | ||
</Content> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Aspects.Windsor | ||
{ | ||
using Boxes.Integration.Extensions; | ||
using Boxes.Integration.Setup; | ||
using Boxes.Integration.Setup.Interception; | ||
using Castle.Windsor; | ||
|
||
public class Extensions : ISetupBoxesExtension<IDefaultContainerSetup<IWindsorContainer>> | ||
{ | ||
public bool CanHandle(IDefaultContainerSetup<IWindsorContainer> extension) | ||
{ | ||
return true; | ||
} | ||
|
||
public void Configure(IDefaultContainerSetup<IWindsorContainer> config) | ||
{ | ||
config.AddInterception(new RegisterInterception() | ||
.Apply<LoggingInterceptor>() | ||
.Where(ctx => ctx.Service.Name.EndsWith("Command"))); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
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("Aspects.Windsor")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("Microsoft")] | ||
[assembly: AssemblyProduct("Aspects.Windsor")] | ||
[assembly: AssemblyCopyright("Copyright © Microsoft 2013")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// Setting ComVisible to false makes the types in this assembly not visible | ||
// to COM components. If you need to access a type in this assembly from | ||
// COM, set the ComVisible attribute to true on that type. | ||
[assembly: ComVisible(false)] | ||
|
||
// The following GUID is for the ID of the typelib if this project is exposed to COM | ||
[assembly: Guid("4417580f-4366-4440-b9a1-3fcc2f314ea9")] | ||
|
||
// Version information for an assembly consists of the following four values: | ||
// | ||
// Major Version | ||
// Minor Version | ||
// Build Number | ||
// Revision | ||
// | ||
// You can specify all the values or you can default the Build and Revision Numbers | ||
// by using the '*' as shown below: | ||
// [assembly: AssemblyVersion("1.0.*")] | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<manifest xmlns="http://schemas.dbones.co.uk/developer/boxes/2012/extension"> | ||
<name>Aspects.Windsor</name> | ||
<version>1.0.0</version> | ||
<description>Extends Boxes.Integration to use aspects</description> | ||
<exports></exports> | ||
<imports> | ||
<dependency name="Identifiers" /> | ||
<dependency name="Aspects" /> | ||
</imports> | ||
<extends> | ||
<assembly name="Aspects.Windsor" /> | ||
</extends> | ||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="Boxes.Core" version="0.4.31" targetFramework="net45" /> | ||
<package id="Boxes.Integration" version="0.4.24" targetFramework="net45" /> | ||
<package id="Boxes.Windsor" version="0.4.25" targetFramework="net45" /> | ||
<package id="Castle.Core" version="3.2.0" targetFramework="net45" /> | ||
<package id="Castle.Windsor" version="3.2.1" targetFramework="net45" /> | ||
</packages> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{C6A4783C-22E9-4DBA-8184-9EF2C7CF604A}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>Aspects</RootNamespace> | ||
<AssemblyName>Aspects</AssemblyName> | ||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
</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="Boxes.Core"> | ||
<HintPath>..\packages\Boxes.Core.0.4.31\lib\net40\Boxes.Core.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Boxes.Integration"> | ||
<HintPath>..\packages\Boxes.Integration.0.4.24\lib\net40\Boxes.Integration.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Castle.Core"> | ||
<HintPath>..\packages\Castle.Core.3.2.0\lib\net45\Castle.Core.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="Microsoft.CSharp" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="LoggingInterceptor.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="packages.config" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Content Include="manifest.xml"> | ||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> | ||
</Content> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\Identifiers\Identifiers.csproj"> | ||
<Project>{5f873342-d9a3-49ad-9398-3391350c124a}</Project> | ||
<Name>Identifiers</Name> | ||
<Private>False</Private> | ||
</ProjectReference> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Aspects | ||
{ | ||
using Castle.DynamicProxy; | ||
using Identifiers; | ||
|
||
public class LoggingInterceptor : IInterceptor, ITransientDependency | ||
{ | ||
public void Intercept(IInvocation invocation) | ||
{ | ||
//over simplified... | ||
try | ||
{ | ||
invocation.Proceed(); | ||
} | ||
catch (Exception) | ||
{ | ||
Console.WriteLine("had issues running: {0}", invocation.TargetType.Name); | ||
invocation.ReturnValue = ""; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
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("Aspects")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("Microsoft")] | ||
[assembly: AssemblyProduct("Aspects")] | ||
[assembly: AssemblyCopyright("Copyright © Microsoft 2013")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// Setting ComVisible to false makes the types in this assembly not visible | ||
// to COM components. If you need to access a type in this assembly from | ||
// COM, set the ComVisible attribute to true on that type. | ||
[assembly: ComVisible(false)] | ||
|
||
// The following GUID is for the ID of the typelib if this project is exposed to COM | ||
[assembly: Guid("6fa60b3e-e5cc-4005-ae82-6d632d2e2036")] | ||
|
||
// Version information for an assembly consists of the following four values: | ||
// | ||
// Major Version | ||
// Minor Version | ||
// Build Number | ||
// Revision | ||
// | ||
// You can specify all the values or you can default the Build and Revision Numbers | ||
// by using the '*' as shown below: | ||
// [assembly: AssemblyVersion("1.0.*")] | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<manifest xmlns="http://schemas.dbones.co.uk/developer/boxes/2012"> | ||
<name>Aspects</name> | ||
<version>1.0.0</version> | ||
<description>AOP interceptors</description> | ||
<exports> | ||
<assembly name="Aspects" /> | ||
</exports> | ||
<imports> | ||
<dependency name="Identifiers" /> | ||
</imports> | ||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="Boxes.Core" version="0.4.31" targetFramework="net45" /> | ||
<package id="Boxes.Integration" version="0.4.24" targetFramework="net45" /> | ||
<package id="Castle.Core" version="3.2.0" targetFramework="net45" /> | ||
</packages> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.