Skip to content

Commit

Permalink
Migrate to net standard 1.3 and upgrade test and sample projects to n…
Browse files Browse the repository at this point in the history
…et core 2
  • Loading branch information
NiklasArbin committed Nov 14, 2017
1 parent 41a6870 commit f720faf
Show file tree
Hide file tree
Showing 14 changed files with 78 additions and 368 deletions.
43 changes: 23 additions & 20 deletions CircuitBreaker.Net.sln
@@ -1,10 +1,8 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.40629.0
# Visual Studio 15
VisualStudioVersion = 15.0.27004.2008
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CircuitBreaker.Net", "src\CircuitBreaker.Net\CircuitBreaker.Net.csproj", "{9483732D-740B-4AB1-B177-063903462AE4}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{8B79E0FA-7FC5-4FC2-98EA-95A7E084DF3B}"
ProjectSection(SolutionItems) = preProject
.nuget\NuGet.Config = .nuget\NuGet.Config
Expand All @@ -22,35 +20,40 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{5384C2AD
build\CircuitBreaker.Net.Source.nuspec = build\CircuitBreaker.Net.Source.nuspec
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CircuitBreaker.Net.Tests", "tests\CircuitBreaker.Net.Tests\CircuitBreaker.Net.Tests.csproj", "{E4877747-A9A9-455B-A8A7-96E38DDA6D07}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CircuitBreaker.Net.Sample", "samples\CircuitBreaker.Net.Sample\CircuitBreaker.Net.Sample.csproj", "{863E4B3C-D632-4848-AAF0-0319C45715E4}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{69F4F939-5D64-4CE7-98B2-85D824D6E911}"
ProjectSection(SolutionItems) = preProject
.travis.yml = .travis.yml
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CircuitBreaker.Net", "src\CircuitBreaker.Net\CircuitBreaker.Net.csproj", "{889A1DFA-7FF1-40F0-ABDE-425899DB6092}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CircuitBreaker.Net.Sample", "samples\CircuitBreaker.Net.Sample\CircuitBreaker.Net.Sample.csproj", "{1618042E-4DEE-4BA0-BE7E-6EE10CF9803C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CircuitBreaker.Net.Tests", "tests\CircuitBreaker.Net.Tests\CircuitBreaker.Net.Tests.csproj", "{5BC87741-2531-4401-8EDF-59348F2662E7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9483732D-740B-4AB1-B177-063903462AE4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9483732D-740B-4AB1-B177-063903462AE4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9483732D-740B-4AB1-B177-063903462AE4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9483732D-740B-4AB1-B177-063903462AE4}.Release|Any CPU.Build.0 = Release|Any CPU
{E4877747-A9A9-455B-A8A7-96E38DDA6D07}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E4877747-A9A9-455B-A8A7-96E38DDA6D07}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E4877747-A9A9-455B-A8A7-96E38DDA6D07}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E4877747-A9A9-455B-A8A7-96E38DDA6D07}.Release|Any CPU.Build.0 = Release|Any CPU
{863E4B3C-D632-4848-AAF0-0319C45715E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{863E4B3C-D632-4848-AAF0-0319C45715E4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{863E4B3C-D632-4848-AAF0-0319C45715E4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{863E4B3C-D632-4848-AAF0-0319C45715E4}.Release|Any CPU.Build.0 = Release|Any CPU
{889A1DFA-7FF1-40F0-ABDE-425899DB6092}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{889A1DFA-7FF1-40F0-ABDE-425899DB6092}.Debug|Any CPU.Build.0 = Debug|Any CPU
{889A1DFA-7FF1-40F0-ABDE-425899DB6092}.Release|Any CPU.ActiveCfg = Release|Any CPU
{889A1DFA-7FF1-40F0-ABDE-425899DB6092}.Release|Any CPU.Build.0 = Release|Any CPU
{1618042E-4DEE-4BA0-BE7E-6EE10CF9803C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1618042E-4DEE-4BA0-BE7E-6EE10CF9803C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1618042E-4DEE-4BA0-BE7E-6EE10CF9803C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1618042E-4DEE-4BA0-BE7E-6EE10CF9803C}.Release|Any CPU.Build.0 = Release|Any CPU
{5BC87741-2531-4401-8EDF-59348F2662E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5BC87741-2531-4401-8EDF-59348F2662E7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5BC87741-2531-4401-8EDF-59348F2662E7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5BC87741-2531-4401-8EDF-59348F2662E7}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {8528F995-4402-440D-91FB-9F5813E386F3}
EndGlobalSection
EndGlobal
6 changes: 0 additions & 6 deletions samples/CircuitBreaker.Net.Sample/App.config

This file was deleted.

68 changes: 8 additions & 60 deletions samples/CircuitBreaker.Net.Sample/CircuitBreaker.Net.Sample.csproj
@@ -1,65 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.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')" />
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{863E4B3C-D632-4848-AAF0-0319C45715E4}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CircuitBreaker.Net.Sample</RootNamespace>
<AssemblyName>CircuitBreaker.Net.Sample</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFramework>netcoreapp2.0</TargetFramework>
<Copyright>Copyright © 2015</Copyright>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<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' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="ExternalService.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\CircuitBreaker.Net\CircuitBreaker.Net.csproj">
<Project>{9483732d-740b-4ab1-b177-063903462ae4}</Project>
<Name>CircuitBreaker.Net</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\CircuitBreaker.Net\CircuitBreaker.Net.csproj" />
</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>

</Project>
2 changes: 1 addition & 1 deletion samples/CircuitBreaker.Net.Sample/ExternalService.cs
Expand Up @@ -10,7 +10,7 @@ public void Get()
throw new Exception();
}

public async Task GetAsync()
public Task GetAsync()
{
throw new Exception();
}
Expand Down
36 changes: 0 additions & 36 deletions samples/CircuitBreaker.Net.Sample/Properties/AssemblyInfo.cs

This file was deleted.

78 changes: 8 additions & 70 deletions src/CircuitBreaker.Net/CircuitBreaker.Net.csproj
@@ -1,74 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.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>{9483732D-740B-4AB1-B177-063903462AE4}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CircuitBreaker.Net</RootNamespace>
<AssemblyName>CircuitBreaker.Net</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>
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard1.3</TargetFramework>
<Description>Implementation of CircuitBreaker pattern on .NET</Description>
<Copyright>Copyright 2015</Copyright>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<DelaySign>false</DelaySign>
<AssemblyOriginatorKeyFile>..\CircuitBreaker.Net.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="CircuitBreaker.cs" />
<Compile Include="CircuitBreakerInvoker.cs" />
<Compile Include="Exceptions\CircuitBreakerException.cs" />
<Compile Include="Exceptions\CircuitBreakerExecutionException.cs" />
<Compile Include="Exceptions\CircuitBreakerOpenException.cs" />
<Compile Include="Exceptions\CircuitBreakerTimeoutException.cs" />
<Compile Include="ICircuitBreaker.cs" />
<Compile Include="ICircuitBreakerEventHandler.cs" />
<Compile Include="ICircuitBreakerInvoker.cs" />
<Compile Include="ICircuitBreakerSwitch.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\InternalsVisibleTo.cs" />
<Compile Include="States\ICircuitBreakerState.cs" />
<Compile Include="States\ClosedCircuitBreakerState.cs" />
<Compile Include="States\HalfOpenCircuitBreakerState.cs" />
<Compile Include="States\OpenCircuitBreakerState.cs" />
<Compile Include="TaskExtensions.cs" />
</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>

</Project>
15 changes: 15 additions & 0 deletions src/CircuitBreaker.Net/InternalsVisibleTo.cs
@@ -0,0 +1,15 @@
using System.Runtime.CompilerServices;

[assembly: InternalsVisibleTo("CircuitBreaker.Net.Tests,PublicKey=" +
"0024000004800000940000000602000000240000525341310004000001000100cf7e8e414bd858" +
"960674b2000ef2df586f00bee296a55e5cb0c8771621a22fde73e8a0c50b66cd35b52496af6661" +
"b8d87266eafc493c057b19b2879cc2dab65a72318917b2537cd0a1acd0a01e15727b1ce3855285" +
"8edc86f2114e0cf15f73c4a49dc04f53d272fe8a9b8d0a0a16a7b4107e3f43035335b3391b5f62" +
"3714669f")]
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=" +
"0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99" +
"c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654" +
"753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46" +
"ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484c" +
"f7045cc7")]

16 changes: 0 additions & 16 deletions src/CircuitBreaker.Net/Properties/AssemblyInfo.cs

This file was deleted.

14 changes: 0 additions & 14 deletions src/CircuitBreaker.Net/Properties/InternalsVisibleTo.cs

This file was deleted.

2 changes: 1 addition & 1 deletion src/CircuitBreaker.Net/States/OpenCircuitBreakerState.cs
Expand Up @@ -44,7 +44,7 @@ public T Invoke<T>(Func<T> func)
throw new CircuitBreakerOpenException();
}

public async Task InvokeAsync(Func<Task> func)
public Task InvokeAsync(Func<Task> func)
{
throw new CircuitBreakerOpenException();
}
Expand Down

0 comments on commit f720faf

Please sign in to comment.