diff --git a/Octokit.Reactive/Clients/IObservableMiscellaneousClient.cs b/Octokit.Reactive/Clients/IObservableMiscellaneousClient.cs index 9c216adb..ecf58209 100644 --- a/Octokit.Reactive/Clients/IObservableMiscellaneousClient.cs +++ b/Octokit.Reactive/Clients/IObservableMiscellaneousClient.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; namespace Octokit.Reactive diff --git a/Octokit.Reactive/Clients/ObservableMiscellaneousClient.cs b/Octokit.Reactive/Clients/ObservableMiscellaneousClient.cs index d18d4c12..702e7ee1 100644 --- a/Octokit.Reactive/Clients/ObservableMiscellaneousClient.cs +++ b/Octokit.Reactive/Clients/ObservableMiscellaneousClient.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Reactive.Threading.Tasks; namespace Octokit.Reactive diff --git a/Octokit.Reactive/Octokit.Reactive.csproj b/Octokit.Reactive/Octokit.Reactive.csproj index 79722400..2bdad6a6 100644 --- a/Octokit.Reactive/Octokit.Reactive.csproj +++ b/Octokit.Reactive/Octokit.Reactive.csproj @@ -18,7 +18,7 @@ full false obj\Debug\Net40 - bin\Debug\Net40 + bin\Debug\Net45\ DEBUG;TRACE;CODE_ANALYSIS;NET_45 prompt 4 @@ -31,7 +31,7 @@ pdbonly true obj\Release\Net40 - bin\Release\Net40 + bin\Release\Net45\ TRACE;NET_45 prompt 4 diff --git a/Octokit.Tests.Integration/Octokit.Tests.Integration.csproj b/Octokit.Tests.Integration/Octokit.Tests.Integration.csproj index c0b63d67..0366926c 100644 --- a/Octokit.Tests.Integration/Octokit.Tests.Integration.csproj +++ b/Octokit.Tests.Integration/Octokit.Tests.Integration.csproj @@ -24,7 +24,7 @@ pdbonly true - bin\Release\ + bin\Release\Net45\ TRACE prompt 4 diff --git a/Octokit.Tests/OctoKit.Tests-NetCore45.csproj b/Octokit.Tests/OctoKit.Tests-NetCore45.csproj index 4b5e4a7b..803627b3 100644 --- a/Octokit.Tests/OctoKit.Tests-NetCore45.csproj +++ b/Octokit.Tests/OctoKit.Tests-NetCore45.csproj @@ -16,7 +16,7 @@ true full false - bin\Debug\ + bin\Debug\NetCore45\ TRACE;DEBUG;NETFX_CORE;CODE_ANALYSIS;SIMPLE_JSON_OBJARRAYINTERNAL;SIMPLE_JSON_INTERNAL;NET_45 prompt 4 @@ -24,7 +24,7 @@ pdbonly true - bin\Release\ + bin\Release\NetCore45\ TRACE;NETFX_CORE;CODE_ANALYSIS;SIMPLE_JSON_OBJARRAYINTERNAL;SIMPLE_JSON_INTERNAL;NET_45 prompt 4 @@ -109,7 +109,7 @@ {c8bc13b6-3fa3-4716-827d-e7706f976fe1} - OctokitRT + Octokit-NetCore45 diff --git a/Octokit.Tests/Octokit.Tests.csproj b/Octokit.Tests/Octokit.Tests.csproj index 2bec1229..2e399b78 100644 --- a/Octokit.Tests/Octokit.Tests.csproj +++ b/Octokit.Tests/Octokit.Tests.csproj @@ -16,7 +16,7 @@ true full false - bin\Debug\ + bin\Debug\Net45\ TRACE;DEBUG;NET_45 prompt 4 @@ -24,7 +24,7 @@ pdbonly true - bin\Release\ + bin\Release\Net45\ TRACE;NET_45 prompt 4 diff --git a/Octokit.Tests/Reactive/ObservableRepositoriesClientTests.cs b/Octokit.Tests/Reactive/ObservableRepositoriesClientTests.cs index c9ee5e6c..dbbe60bf 100644 --- a/Octokit.Tests/Reactive/ObservableRepositoriesClientTests.cs +++ b/Octokit.Tests/Reactive/ObservableRepositoriesClientTests.cs @@ -26,7 +26,8 @@ namespace Octokit.Tests.Reactive var gitHubClient = new GitHubClient(connection); var client = new ObservableRepositoriesClient(gitHubClient); var observable = client.Get("stark", "ned"); - connection.Received(0).GetAsync(Args.Uri); + + connection.Received(1).GetAsync(Args.Uri, null, null); var result = await observable; connection.Received(1).GetAsync(Args.Uri, null, null); diff --git a/Octokit.msbuild b/Octokit.msbuild index f6bd6b8f..1ffc872a 100644 --- a/Octokit.msbuild +++ b/Octokit.msbuild @@ -14,11 +14,11 @@ - + - - + + @@ -31,5 +31,5 @@ - + diff --git a/Octokit/Clients/CommitStatusClient.cs b/Octokit/Clients/CommitStatusClient.cs index a9fb46cf..d743c237 100644 --- a/Octokit/Clients/CommitStatusClient.cs +++ b/Octokit/Clients/CommitStatusClient.cs @@ -1,6 +1,4 @@ -#if NETFX_CORE -using System.Collections.Generic; -#endif +using System.Collections.Generic; using System.Threading.Tasks; namespace Octokit diff --git a/Octokit/Clients/ICommitStatusClient.cs b/Octokit/Clients/ICommitStatusClient.cs index 41842253..30f15d13 100644 --- a/Octokit/Clients/ICommitStatusClient.cs +++ b/Octokit/Clients/ICommitStatusClient.cs @@ -1,6 +1,4 @@ -#if NETFX_CORE -using System.Collections.Generic; -#endif +using System.Collections.Generic; using System.Threading.Tasks; namespace Octokit diff --git a/Octokit/Helpers/Net45CompatibilityShim.cs b/Octokit/Helpers/Net45CompatibilityShim.cs deleted file mode 100644 index 7037a88c..00000000 --- a/Octokit/Helpers/Net45CompatibilityShim.cs +++ /dev/null @@ -1,114 +0,0 @@ -// ---------------------------------------------------- -// THIS WHOLE File CAN GO AWAY WHEN WE TARGET 4.5 ONLY -// ---------------------------------------------------- -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - -namespace Octokit -{ - [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")] - [SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix")] - public interface IReadOnlyDictionary : IReadOnlyCollection> - { - bool ContainsKey(TKey key); - bool TryGetValue(TKey key, out TValue value); - - TValue this[TKey key] { get; } - IEnumerable Keys { get; } - IEnumerable Values { get; } - } - - [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")] - public interface IReadOnlyList : IReadOnlyCollection - { - TItem this[int index] { get; } - } - - public interface IReadOnlyCollection : IEnumerable - { - int Count { get; } - } - - public class ReadOnlyCollection : IReadOnlyList - { - readonly List _source; - - public ReadOnlyCollection(IList source) - { - _source = new List(source); - } - - public IEnumerator GetEnumerator() - { - return _source.GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - - public int Count - { - get { return _source.Count; } - } - - public TItem this[int index] - { - get { return _source[index]; } - } - } - - [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")] - [SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix")] - public class ReadOnlyDictionary : IReadOnlyDictionary - { - readonly IDictionary _source; - - public ReadOnlyDictionary(IDictionary source) - { - _source = new Dictionary(source); - } - - public IEnumerator> GetEnumerator() - { - return _source.GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - - public int Count - { - get { return _source.Count; } - } - - public bool ContainsKey(TKey key) - { - return _source.ContainsKey(key); - } - - public bool TryGetValue(TKey key, out TValue value) - { - return _source.TryGetValue(key, out value); - } - - public TValue this[TKey key] - { - get { return _source[key]; } - } - - public IEnumerable Keys - { - get { return _source.Keys; } - } - - public IEnumerable Values - { - get { return _source.Values; } - } - } -} diff --git a/Octokit/Octokit-netcore45.csproj b/Octokit/Octokit-netcore45.csproj index 4ce98065..23698df4 100644 --- a/Octokit/Octokit-netcore45.csproj +++ b/Octokit/Octokit-netcore45.csproj @@ -29,7 +29,7 @@ pdbonly true obj\Release\NetCore45 - bin\Release\NetCore45 + bin\Release\NetCore45\ TRACE;NETFX_CORE;CODE_ANALYSIS;SIMPLE_JSON_OBJARRAYINTERNAL;SIMPLE_JSON_INTERNAL;NET_45 prompt 4 @@ -180,4 +180,4 @@ --> - + \ No newline at end of file diff --git a/Octokit/Octokit.csproj b/Octokit/Octokit.csproj index 6a070105..b9a387e7 100644 --- a/Octokit/Octokit.csproj +++ b/Octokit/Octokit.csproj @@ -17,8 +17,8 @@ true full false - obj\Debug\Net40 - bin\Debug\Net40 + obj\Debug\Net45 + bin\Debug\Net45 TRACE;DEBUG;CODE_ANALYSIS;CODE_ANALYSIS;SIMPLE_JSON_OBJARRAYINTERNAL;SIMPLE_JSON_INTERNAL;NET_45 prompt 4 @@ -31,8 +31,8 @@ pdbonly true - obj\Release\Net40 - bin\Release\Net40 + obj\Release\Net45 + bin\Release\Net45\ TRACE;CODE_ANALYSIS;CODE_ANALYSIS;SIMPLE_JSON_OBJARRAYINTERNAL;SIMPLE_JSON_INTERNAL;NET_45 prompt 4 @@ -117,7 +117,6 @@ - @@ -211,4 +210,4 @@ --> - + \ No newline at end of file diff --git a/build.cmd b/build.cmd index 7c4b2fc7..6b135685 100644 --- a/build.cmd +++ b/build.cmd @@ -14,8 +14,8 @@ if not exist packaging\octokit\lib\netcore45 mkdir packaging\octokit\lib\netcore copy LICENSE.txt packaging\octokit\ copy README.md packaging\octokit\ -copy Octokit\bin\Release\Octokit.dll packaging\octokit\lib\net45\ -copy Octokit\bin\WinRT\Release\OctokitRT.dll packaging\octokit\lib\netcore45\ +copy Octokit\bin\%config%\Net45\Octokit.dll packaging\octokit\lib\net45\ +copy Octokit\bin\%config%\NetCore45\Octokit.dll packaging\octokit\lib\netcore45\ tools\nuget\nuget.exe pack "octokit.nuspec" -BasePath packaging\octokit -Output packaging diff --git a/script/cibuild.ps1 b/script/cibuild.ps1 index bb26e07e..5212d2ab 100644 --- a/script/cibuild.ps1 +++ b/script/cibuild.ps1 @@ -84,8 +84,8 @@ if ($LastExitCode -ne 0) { Die-WithOutput $exitCode $output } -function Run-XUnit([string]$project, [int]$timeoutDuration, [string]$projectFolder = $project) { - $dll = "$projectFolder\bin\Release\$project.dll" +function Run-XUnit([string]$platform, [string]$project, [int]$timeoutDuration, [string]$projectFolder = $project) { + $dll = "$projectFolder\bin\Release\$platform\$project.dll" $xunitDirectory = Join-Path $rootDirectory tools\xunit $consoleRunner = Join-Path $xunitDirectory xunit.console.clr4.x86.exe @@ -102,7 +102,7 @@ function Run-XUnit([string]$project, [int]$timeoutDuration, [string]$projectFold $exitCode = 0 Write-Output "Running Octokit.Tests..." -$result = Run-XUnit Octokit.Tests 120 +$result = Run-XUnit Net45 Octokit.Tests 120 if ($result.ExitCode -eq 0) { # Print out the test result summary. Write-Output $result.Output[-1] @@ -112,8 +112,8 @@ if ($result.ExitCode -eq 0) { } Write-Output "" -Write-Output "Running OctokitRT.Tests..." -$result = Run-XUnit OctokitRT.Tests 120 Octokit.Tests +Write-Output "Running Octokit.Tests-NetCore45..." +$result = Run-XUnit NetCore45 Octokit.Tests-NetCore45 120 Octokit.Tests if ($result.ExitCode -eq 0) { # Print out the test result summary. Write-Output $result.Output[-1] @@ -124,7 +124,7 @@ if ($result.ExitCode -eq 0) { Write-Output "" Write-Output "Running Octokit.Tests.Integration..." -$result = Run-XUnit Octokit.Tests.Integration 180 +$result = Run-XUnit Net45 Octokit.Tests.Integration 180 if ($result.ExitCode -eq 0) { # Print out the test result summary. Write-Output $result.Output[-1]