Skip to content
This repository has been archived by the owner on Nov 8, 2021. It is now read-only.

Commit

Permalink
Merge pull request #5 from ViceIce/devel
Browse files Browse the repository at this point in the history
Migrate to dotnet sdk
  • Loading branch information
viceice authored Dec 6, 2017
2 parents ba97a5e + 4ddc0c7 commit cc9a648
Show file tree
Hide file tree
Showing 10 changed files with 60 additions and 197 deletions.
13 changes: 10 additions & 3 deletions Build.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
@rem ..\..\tools\nuget pack
@nuget pack Unity.Wcf\Unity.Wcf.csproj -properties Configuration=Release -symbols -build -OutputDirectory bin %*
@rem nuget pack Unity.Wcf\Unity.Wcf.csproj -properties Configuration=Release -symbols -build -OutputDirectory bin %*

@rem pause
@echo off

for /f "usebackq tokens=*" %%i in (`vswhere -latest -products * -requires Microsoft.Component.MSBuild -property installationPath`) do (
set InstallDir=%%i
)

if exist "%InstallDir%\MSBuild\15.0\Bin\MSBuild.exe" (
"%InstallDir%\MSBuild\15.0\Bin\MSBuild.exe" Unity.Wcf.sln /nologo /p:Configuration=Release /m /v:m %*
)
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]
### Changed
- Migrated Unity to Unity.Container 5.0.0
- Migrated to dotnet sdk


## [3.0.0] - 2017-08-18
Expand Down
36 changes: 0 additions & 36 deletions Unity.Wcf/Properties/AssemblyInfo.cs

This file was deleted.

129 changes: 42 additions & 87 deletions Unity.Wcf/Unity.Wcf.csproj
Original file line number Diff line number Diff line change
@@ -1,87 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{8D78E387-BD71-4399-8A8E-6AE0DC8600F6}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Unity.Wcf</RootNamespace>
<AssemblyName>Unity.Wcf</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</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>
<Prefer32Bit>false</Prefer32Bit>
</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>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>Unity.Wcf.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.ServiceModel.Activation" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="Unity.Abstractions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=6d32ff45e0ccc69f, processorArchitecture=MSIL">
<HintPath>..\packages\Unity.Abstractions.2.0.1\lib\net45\Unity.Abstractions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Unity.Container, Version=5.0.0.0, Culture=neutral, PublicKeyToken=489b6accfaf20ef0, processorArchitecture=MSIL">
<HintPath>..\packages\Unity.Container.5.0.0\lib\net45\Unity.Container.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="UnityContractBehavior.cs" />
<Compile Include="UnityInstanceContextExtension.cs" />
<Compile Include="UnityInstanceContextInitializer.cs" />
<Compile Include="UnityInstanceProvider.cs" />
<Compile Include="UnityServiceHost.cs" />
<Compile Include="UnityServiceHostFactory.cs" />
</ItemGroup>
<ItemGroup>
<None Include="content\WcfServiceFactory.cs.pp" />
<None Include="packages.config" />
<None Include="Unity.Wcf.nuspec" />
<None Include="Unity.Wcf.snk" />
</ItemGroup>
<ItemGroup>
<None Include="content\Unity.Wcf.README.txt" />
</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>
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PackageId>Unity.Wcf</PackageId>
<Description>Unity.Wcf is a library that allows simple Integration of Microsoft's Unity IoC container with WCF. This project includes a bespoke InstanceProvider that creates a child container per client connection and disposes of all registered IDisposable instances once the connection is terminated.</Description>
<Version>4.0.0</Version>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<FileVersion>4.0.0.0</FileVersion>
<Copyright>Copyright © DevTrends 2012</Copyright>
<PackageProjectUrl>https://github.com/ViceIce/unity.wcf</PackageProjectUrl>
<RepositoryUrl>https://github.com/ViceIce/unity.wcf</RepositoryUrl>
<PackageLicenseUrl>https://github.com/ViceIce/unity.wcf/blob/master/LICENSE</PackageLicenseUrl>
<PackageIconUrl></PackageIconUrl>
<RepositoryType>git</RepositoryType>
<PackageReleaseNotes></PackageReleaseNotes>
<Authors>Paul Hiles, Michael Kriese</Authors>
<PackageTags>wcf unity ioc di</PackageTags>
<RootNamespace>Unity.Wcf</RootNamespace>
<Configurations>Debug;Release</Configurations>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>Unity.Wcf.snk</AssemblyOriginatorKeyFile>
<TargetFrameworks>net45</TargetFrameworks>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageOutputPath>$(SolutionDir)bin</PackageOutputPath>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DebugType>Full</DebugType>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
</PropertyGroup>

<ItemGroup>
<Reference Include="System.ServiceModel" />
<Reference Include="System.ServiceModel.Activation" />
<PackageReference Include="Unity.Container" Version="5.0.0" />
</ItemGroup>
</Project>
22 changes: 0 additions & 22 deletions Unity.Wcf/Unity.Wcf.nuspec

This file was deleted.

11 changes: 3 additions & 8 deletions Unity.Wcf/UnityContractBehavior.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.ServiceModel.Channels;
using System.ServiceModel.Description;
using System.ServiceModel.Dispatcher;
Expand All @@ -11,12 +11,7 @@ public class UnityContractBehavior : IContractBehavior

public UnityContractBehavior(IInstanceProvider instanceProvider)
{
if (instanceProvider == null)
{
throw new ArgumentNullException("instanceProvider");
}

_instanceProvider = instanceProvider;
_instanceProvider = instanceProvider ?? throw new ArgumentNullException("instanceProvider");
}

public void AddBindingParameters(ContractDescription contractDescription, ServiceEndpoint endpoint, BindingParameterCollection bindingParameters)
Expand All @@ -37,4 +32,4 @@ public void Validate(ContractDescription contractDescription, ServiceEndpoint en
{
}
}
}
}
18 changes: 4 additions & 14 deletions Unity.Wcf/UnityInstanceProvider.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.ServiceModel;
using System.ServiceModel.Channels;
using System.ServiceModel.Dispatcher;
Expand All @@ -12,18 +12,8 @@ public class UnityInstanceProvider : IInstanceProvider

public UnityInstanceProvider(IUnityContainer container, Type contractType)
{
if (container == null)
{
throw new ArgumentNullException("container");
}

if (contractType == null)
{
throw new ArgumentNullException("contractType");
}

_container = container;
_contractType = contractType;
_container = container ?? throw new ArgumentNullException("container");
_contractType = contractType ?? throw new ArgumentNullException("contractType");
}

public object GetInstance(InstanceContext instanceContext, Message message)
Expand All @@ -44,4 +34,4 @@ public void ReleaseInstance(InstanceContext instanceContext, object instance)
instanceContext.Extensions.Find<UnityInstanceContextExtension>().DisposeOfChildContainer();
}
}
}
}
6 changes: 0 additions & 6 deletions Unity.Wcf/content/Unity.Wcf.README.txt

This file was deleted.

16 changes: 0 additions & 16 deletions Unity.Wcf/content/WcfServiceFactory.cs.pp

This file was deleted.

5 changes: 0 additions & 5 deletions Unity.Wcf/packages.config

This file was deleted.

0 comments on commit cc9a648

Please sign in to comment.