diff --git a/Build.bat b/Build.bat
index 23f8f39..725716c 100644
--- a/Build.bat
+++ b/Build.bat
@@ -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 %*
+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 83cca6b..748ab83 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -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
diff --git a/Unity.Wcf/Properties/AssemblyInfo.cs b/Unity.Wcf/Properties/AssemblyInfo.cs
deleted file mode 100644
index 15c7703..0000000
--- a/Unity.Wcf/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-using System.Reflection;
-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("Unity.Wcf")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("DevTrends")]
-[assembly: AssemblyProduct("Unity.Wcf")]
-[assembly: AssemblyCopyright("Copyright © DevTrends 2012")]
-[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("23d35d8e-4fcf-4883-a014-63e622391798")]
-
-// 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("4.0.0.0")]
-[assembly: AssemblyFileVersion("4.0.0")]
-[assembly: AssemblyInformationalVersion("4.0.0")]
diff --git a/Unity.Wcf/Unity.Wcf.csproj b/Unity.Wcf/Unity.Wcf.csproj
index 94e76b1..2212029 100644
--- a/Unity.Wcf/Unity.Wcf.csproj
+++ b/Unity.Wcf/Unity.Wcf.csproj
@@ -1,87 +1,42 @@
-
-
-
- Debug
- AnyCPU
- 8.0.30703
- 2.0
- {8D78E387-BD71-4399-8A8E-6AE0DC8600F6}
- Library
- Properties
- Unity.Wcf
- Unity.Wcf
- v4.5
- 512
-
-
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
- false
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
- false
-
-
- true
-
-
- Unity.Wcf.snk
-
-
-
-
-
-
-
-
-
-
-
-
- ..\packages\Unity.Abstractions.2.0.1\lib\net45\Unity.Abstractions.dll
- True
-
-
- ..\packages\Unity.Container.5.0.0\lib\net45\Unity.Container.dll
- True
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+
+
+ Unity.Wcf
+ 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.
+ 4.0.0
+ 4.0.0.0
+ 4.0.0.0
+ Copyright © DevTrends 2012
+ https://github.com/ViceIce/unity.wcf
+ https://github.com/ViceIce/unity.wcf
+ https://github.com/ViceIce/unity.wcf/blob/master/LICENSE
+
+ git
+
+ Paul Hiles, Michael Kriese
+ wcf unity ioc di
+ Unity.Wcf
+ Debug;Release
+
+
+ true
+ Unity.Wcf.snk
+ net45
+
+
+
+ true
+ $(SolutionDir)bin
+
+
+
+ Full
+ false
+
+
+
+
+
+
+
+
diff --git a/Unity.Wcf/Unity.Wcf.nuspec b/Unity.Wcf/Unity.Wcf.nuspec
deleted file mode 100644
index 7b0a26a..0000000
--- a/Unity.Wcf/Unity.Wcf.nuspec
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
- Unity.Wcf
- $version$
- Paul Hiles, Michael Kriese
- DevTrends
- https://github.com/ViceIce/unity.wcf/raw/master/LICENSE
- https://github.com/ViceIce/unity.wcf
- false
- 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.
- wcf unity ioc di
-
-
-
-
-
-
-
-
-
-
diff --git a/Unity.Wcf/UnityContractBehavior.cs b/Unity.Wcf/UnityContractBehavior.cs
index f7b587d..71cefbe 100644
--- a/Unity.Wcf/UnityContractBehavior.cs
+++ b/Unity.Wcf/UnityContractBehavior.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.ServiceModel.Channels;
using System.ServiceModel.Description;
using System.ServiceModel.Dispatcher;
@@ -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)
@@ -37,4 +32,4 @@ public void Validate(ContractDescription contractDescription, ServiceEndpoint en
{
}
}
-}
\ No newline at end of file
+}
diff --git a/Unity.Wcf/UnityInstanceProvider.cs b/Unity.Wcf/UnityInstanceProvider.cs
index 5a3a1a6..1f570d0 100644
--- a/Unity.Wcf/UnityInstanceProvider.cs
+++ b/Unity.Wcf/UnityInstanceProvider.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.ServiceModel;
using System.ServiceModel.Channels;
using System.ServiceModel.Dispatcher;
@@ -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)
@@ -44,4 +34,4 @@ public void ReleaseInstance(InstanceContext instanceContext, object instance)
instanceContext.Extensions.Find().DisposeOfChildContainer();
}
}
-}
\ No newline at end of file
+}
diff --git a/Unity.Wcf/content/Unity.Wcf.README.txt b/Unity.Wcf/content/Unity.Wcf.README.txt
deleted file mode 100644
index 400c8e5..0000000
--- a/Unity.Wcf/content/Unity.Wcf.README.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-Getting started with Unity.Wcf
-------------------------------
-
-Find out how to use Unity.Wcf by visiting http://unitywcf.codeplex.com/
-
-Please report all bugs and feature requests on CodePlex.
\ No newline at end of file
diff --git a/Unity.Wcf/content/WcfServiceFactory.cs.pp b/Unity.Wcf/content/WcfServiceFactory.cs.pp
deleted file mode 100644
index afcadc9..0000000
--- a/Unity.Wcf/content/WcfServiceFactory.cs.pp
+++ /dev/null
@@ -1,16 +0,0 @@
-using Unity;
-using Unity.Wcf;
-
-namespace $rootnamespace$
-{
- public class WcfServiceFactory : UnityServiceHostFactory
- {
- protected override void ConfigureContainer(IUnityContainer container)
- {
- // register all your components with the container here
- // container
- // .RegisterType()
- // .RegisterType(new HierarchicalLifetimeManager());
- }
- }
-}
diff --git a/Unity.Wcf/packages.config b/Unity.Wcf/packages.config
deleted file mode 100644
index 70a61e7..0000000
--- a/Unity.Wcf/packages.config
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file