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

Commit cc9a648

Browse files
authored
Merge pull request #5 from ViceIce/devel
Migrate to dotnet sdk
2 parents ba97a5e + 4ddc0c7 commit cc9a648

File tree

10 files changed

+60
-197
lines changed

10 files changed

+60
-197
lines changed

Build.bat

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
@rem ..\..\tools\nuget pack
2-
@nuget pack Unity.Wcf\Unity.Wcf.csproj -properties Configuration=Release -symbols -build -OutputDirectory bin %*
1+
@rem nuget pack Unity.Wcf\Unity.Wcf.csproj -properties Configuration=Release -symbols -build -OutputDirectory bin %*
32

4-
@rem pause
3+
@echo off
4+
5+
for /f "usebackq tokens=*" %%i in (`vswhere -latest -products * -requires Microsoft.Component.MSBuild -property installationPath`) do (
6+
set InstallDir=%%i
7+
)
8+
9+
if exist "%InstallDir%\MSBuild\15.0\Bin\MSBuild.exe" (
10+
"%InstallDir%\MSBuild\15.0\Bin\MSBuild.exe" Unity.Wcf.sln /nologo /p:Configuration=Release /m /v:m %*
11+
)

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77
## [Unreleased]
88
### Changed
99
- Migrated Unity to Unity.Container 5.0.0
10+
- Migrated to dotnet sdk
1011

1112

1213
## [3.0.0] - 2017-08-18

Unity.Wcf/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 36 deletions
This file was deleted.

Unity.Wcf/Unity.Wcf.csproj

Lines changed: 42 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,42 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<PropertyGroup>
4-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6-
<ProductVersion>8.0.30703</ProductVersion>
7-
<SchemaVersion>2.0</SchemaVersion>
8-
<ProjectGuid>{8D78E387-BD71-4399-8A8E-6AE0DC8600F6}</ProjectGuid>
9-
<OutputType>Library</OutputType>
10-
<AppDesignerFolder>Properties</AppDesignerFolder>
11-
<RootNamespace>Unity.Wcf</RootNamespace>
12-
<AssemblyName>Unity.Wcf</AssemblyName>
13-
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
14-
<FileAlignment>512</FileAlignment>
15-
<TargetFrameworkProfile />
16-
</PropertyGroup>
17-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
18-
<DebugSymbols>true</DebugSymbols>
19-
<DebugType>full</DebugType>
20-
<Optimize>false</Optimize>
21-
<OutputPath>bin\Debug\</OutputPath>
22-
<DefineConstants>DEBUG;TRACE</DefineConstants>
23-
<ErrorReport>prompt</ErrorReport>
24-
<WarningLevel>4</WarningLevel>
25-
<Prefer32Bit>false</Prefer32Bit>
26-
</PropertyGroup>
27-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
28-
<DebugType>pdbonly</DebugType>
29-
<Optimize>true</Optimize>
30-
<OutputPath>bin\Release\</OutputPath>
31-
<DefineConstants>TRACE</DefineConstants>
32-
<ErrorReport>prompt</ErrorReport>
33-
<WarningLevel>4</WarningLevel>
34-
<Prefer32Bit>false</Prefer32Bit>
35-
</PropertyGroup>
36-
<PropertyGroup>
37-
<SignAssembly>true</SignAssembly>
38-
</PropertyGroup>
39-
<PropertyGroup>
40-
<AssemblyOriginatorKeyFile>Unity.Wcf.snk</AssemblyOriginatorKeyFile>
41-
</PropertyGroup>
42-
<ItemGroup>
43-
<Reference Include="System" />
44-
<Reference Include="System.Core" />
45-
<Reference Include="System.ServiceModel" />
46-
<Reference Include="System.ServiceModel.Activation" />
47-
<Reference Include="System.Xml.Linq" />
48-
<Reference Include="System.Data.DataSetExtensions" />
49-
<Reference Include="Microsoft.CSharp" />
50-
<Reference Include="System.Data" />
51-
<Reference Include="System.Xml" />
52-
<Reference Include="Unity.Abstractions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=6d32ff45e0ccc69f, processorArchitecture=MSIL">
53-
<HintPath>..\packages\Unity.Abstractions.2.0.1\lib\net45\Unity.Abstractions.dll</HintPath>
54-
<Private>True</Private>
55-
</Reference>
56-
<Reference Include="Unity.Container, Version=5.0.0.0, Culture=neutral, PublicKeyToken=489b6accfaf20ef0, processorArchitecture=MSIL">
57-
<HintPath>..\packages\Unity.Container.5.0.0\lib\net45\Unity.Container.dll</HintPath>
58-
<Private>True</Private>
59-
</Reference>
60-
</ItemGroup>
61-
<ItemGroup>
62-
<Compile Include="Properties\AssemblyInfo.cs" />
63-
<Compile Include="UnityContractBehavior.cs" />
64-
<Compile Include="UnityInstanceContextExtension.cs" />
65-
<Compile Include="UnityInstanceContextInitializer.cs" />
66-
<Compile Include="UnityInstanceProvider.cs" />
67-
<Compile Include="UnityServiceHost.cs" />
68-
<Compile Include="UnityServiceHostFactory.cs" />
69-
</ItemGroup>
70-
<ItemGroup>
71-
<None Include="content\WcfServiceFactory.cs.pp" />
72-
<None Include="packages.config" />
73-
<None Include="Unity.Wcf.nuspec" />
74-
<None Include="Unity.Wcf.snk" />
75-
</ItemGroup>
76-
<ItemGroup>
77-
<None Include="content\Unity.Wcf.README.txt" />
78-
</ItemGroup>
79-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
80-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
81-
Other similar extension points exist, see Microsoft.Common.targets.
82-
<Target Name="BeforeBuild">
83-
</Target>
84-
<Target Name="AfterBuild">
85-
</Target>
86-
-->
87-
</Project>
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project Sdk="Microsoft.NET.Sdk">
3+
<PropertyGroup>
4+
<PackageId>Unity.Wcf</PackageId>
5+
<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>
6+
<Version>4.0.0</Version>
7+
<AssemblyVersion>4.0.0.0</AssemblyVersion>
8+
<FileVersion>4.0.0.0</FileVersion>
9+
<Copyright>Copyright © DevTrends 2012</Copyright>
10+
<PackageProjectUrl>https://github.com/ViceIce/unity.wcf</PackageProjectUrl>
11+
<RepositoryUrl>https://github.com/ViceIce/unity.wcf</RepositoryUrl>
12+
<PackageLicenseUrl>https://github.com/ViceIce/unity.wcf/blob/master/LICENSE</PackageLicenseUrl>
13+
<PackageIconUrl></PackageIconUrl>
14+
<RepositoryType>git</RepositoryType>
15+
<PackageReleaseNotes></PackageReleaseNotes>
16+
<Authors>Paul Hiles, Michael Kriese</Authors>
17+
<PackageTags>wcf unity ioc di</PackageTags>
18+
<RootNamespace>Unity.Wcf</RootNamespace>
19+
<Configurations>Debug;Release</Configurations>
20+
</PropertyGroup>
21+
<PropertyGroup>
22+
<SignAssembly>true</SignAssembly>
23+
<AssemblyOriginatorKeyFile>Unity.Wcf.snk</AssemblyOriginatorKeyFile>
24+
<TargetFrameworks>net45</TargetFrameworks>
25+
</PropertyGroup>
26+
27+
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
28+
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
29+
<PackageOutputPath>$(SolutionDir)bin</PackageOutputPath>
30+
</PropertyGroup>
31+
32+
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
33+
<DebugType>Full</DebugType>
34+
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
35+
</PropertyGroup>
36+
37+
<ItemGroup>
38+
<Reference Include="System.ServiceModel" />
39+
<Reference Include="System.ServiceModel.Activation" />
40+
<PackageReference Include="Unity.Container" Version="5.0.0" />
41+
</ItemGroup>
42+
</Project>

Unity.Wcf/Unity.Wcf.nuspec

Lines changed: 0 additions & 22 deletions
This file was deleted.

Unity.Wcf/UnityContractBehavior.cs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.ServiceModel.Channels;
33
using System.ServiceModel.Description;
44
using System.ServiceModel.Dispatcher;
@@ -11,12 +11,7 @@ public class UnityContractBehavior : IContractBehavior
1111

1212
public UnityContractBehavior(IInstanceProvider instanceProvider)
1313
{
14-
if (instanceProvider == null)
15-
{
16-
throw new ArgumentNullException("instanceProvider");
17-
}
18-
19-
_instanceProvider = instanceProvider;
14+
_instanceProvider = instanceProvider ?? throw new ArgumentNullException("instanceProvider");
2015
}
2116

2217
public void AddBindingParameters(ContractDescription contractDescription, ServiceEndpoint endpoint, BindingParameterCollection bindingParameters)
@@ -37,4 +32,4 @@ public void Validate(ContractDescription contractDescription, ServiceEndpoint en
3732
{
3833
}
3934
}
40-
}
35+
}

Unity.Wcf/UnityInstanceProvider.cs

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.ServiceModel;
33
using System.ServiceModel.Channels;
44
using System.ServiceModel.Dispatcher;
@@ -12,18 +12,8 @@ public class UnityInstanceProvider : IInstanceProvider
1212

1313
public UnityInstanceProvider(IUnityContainer container, Type contractType)
1414
{
15-
if (container == null)
16-
{
17-
throw new ArgumentNullException("container");
18-
}
19-
20-
if (contractType == null)
21-
{
22-
throw new ArgumentNullException("contractType");
23-
}
24-
25-
_container = container;
26-
_contractType = contractType;
15+
_container = container ?? throw new ArgumentNullException("container");
16+
_contractType = contractType ?? throw new ArgumentNullException("contractType");
2717
}
2818

2919
public object GetInstance(InstanceContext instanceContext, Message message)
@@ -44,4 +34,4 @@ public void ReleaseInstance(InstanceContext instanceContext, object instance)
4434
instanceContext.Extensions.Find<UnityInstanceContextExtension>().DisposeOfChildContainer();
4535
}
4636
}
47-
}
37+
}

Unity.Wcf/content/Unity.Wcf.README.txt

Lines changed: 0 additions & 6 deletions
This file was deleted.

Unity.Wcf/content/WcfServiceFactory.cs.pp

Lines changed: 0 additions & 16 deletions
This file was deleted.

Unity.Wcf/packages.config

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)