Skip to content

Commit

Permalink
Merge pull request #1 from dbones/master
Browse files Browse the repository at this point in the history
0.4.x
  • Loading branch information
dbones committed Oct 18, 2013
2 parents a1a32ff + f9602e4 commit a4d85c7
Show file tree
Hide file tree
Showing 32 changed files with 963 additions and 55 deletions.
90 changes: 90 additions & 0 deletions src/Aspects.Windsor/Aspects.Windsor.csproj
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>
28 changes: 28 additions & 0 deletions src/Aspects.Windsor/Extensions.cs
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")));
}
}
}
36 changes: 36 additions & 0 deletions src/Aspects.Windsor/Properties/AssemblyInfo.cs
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")]
14 changes: 14 additions & 0 deletions src/Aspects.Windsor/manifest.xml
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>
8 changes: 8 additions & 0 deletions src/Aspects.Windsor/packages.config
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>
74 changes: 74 additions & 0 deletions src/Aspects/Aspects.csproj
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>
28 changes: 28 additions & 0 deletions src/Aspects/LoggingInterceptor.cs
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 = "";
}
}
}
}
36 changes: 36 additions & 0 deletions src/Aspects/Properties/AssemblyInfo.cs
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")]
12 changes: 12 additions & 0 deletions src/Aspects/manifest.xml
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>
6 changes: 6 additions & 0 deletions src/Aspects/packages.config
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>
18 changes: 11 additions & 7 deletions src/Calc.CommandLine/Calc.CommandLine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,23 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Boxes.Core, Version=0.1.17.0, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="Boxes.Core, Version=0.4.31.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Boxes.Core.0.1.17\lib\net40\Boxes.Core.dll</HintPath>
<HintPath>..\packages\Boxes.Core.0.4.31\lib\net40\Boxes.Core.dll</HintPath>
</Reference>
<Reference Include="Boxes.Integration, Version=0.1.6.0, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="Boxes.Integration, Version=0.4.24.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Boxes.Integration.0.1.6\lib\net40\Boxes.Integration.dll</HintPath>
<HintPath>..\packages\Boxes.Integration.0.4.24\lib\net40\Boxes.Integration.dll</HintPath>
</Reference>
<Reference Include="Boxes.Windsor, Version=0.1.7.0, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="Boxes.Windsor, Version=0.4.25.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Boxes.Windsor.0.1.7\lib\net40\Boxes.Windsor.dll</HintPath>
<HintPath>..\packages\Boxes.Windsor.0.4.25\lib\net40\Boxes.Windsor.dll</HintPath>
</Reference>
<Reference Include="Castle.Core">
<HintPath>..\packages\Castle.Core.3.2.0\lib\net45\Castle.Core.dll</HintPath>
</Reference>
<Reference Include="Castle.Windsor">
<HintPath>..\packages\Castle.Windsor.3.2.0\lib\net45\Castle.Windsor.dll</HintPath>
<HintPath>..\packages\Castle.Windsor.3.2.1\lib\net45\Castle.Windsor.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down Expand Up @@ -80,6 +80,10 @@
<Project>{5F873342-D9A3-49AD-9398-3391350C124A}</Project>
<Name>Identifiers</Name>
</ProjectReference>
<ProjectReference Include="..\Process\Process.csproj">
<Project>{9147ef1b-645b-4b6f-819d-61ebff66b43d}</Project>
<Name>Process</Name>
</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.
Expand Down
Loading

0 comments on commit a4d85c7

Please sign in to comment.