diff --git a/ThriftSharp.Benchmarking/MemoryBuffer.cs b/ThriftSharp.Benchmarking/MemoryBuffer.cs index 39826ba..b74fd45 100644 --- a/ThriftSharp.Benchmarking/MemoryBuffer.cs +++ b/ThriftSharp.Benchmarking/MemoryBuffer.cs @@ -20,13 +20,7 @@ public static ArraySegment Serialize( T obj ) var buffer = new MemoryBuffer() { _memory = new MemoryStream() }; ThriftStructWriter.Write( obj, new ThriftBinaryProtocol( buffer ) ); - ArraySegment result; - if( buffer._memory.TryGetBuffer( out result ) ) - { - return result; - } - - throw new Exception( "What now?" ); + return new ArraySegment( buffer._memory.GetBuffer() ); } public static T Deserialize( ArraySegment bytes ) diff --git a/ThriftSharp.Benchmarking/project.json b/ThriftSharp.Benchmarking/project.json index 0d0bdb2..206a67b 100644 --- a/ThriftSharp.Benchmarking/project.json +++ b/ThriftSharp.Benchmarking/project.json @@ -1,31 +1,27 @@ { - "version": "5.0.0", - "buildOptions": { "emitEntryPoint": true }, "dependencies": { - "Microsoft.NETCore.Portable.Compatibility": "1.0.1", - - "Microsoft.NETCore.App": { - "type": "platform", - "version": "1.0.0" - }, - "ApacheThrift": "0.9.3", + "ThriftSharp": "5.0.4", + "BenchmarkDotNet": "0.9.9", "BenchmarkDotNet.Diagnostics.Windows": "0.9.9" }, "frameworks": { - "netcoreapp1.0": { - "imports": [ "net35", "net45" ], - "dependencies": { - "ThriftSharp": { - "target": "project" - } - } - } + "net451": {} + // TODO make that work + //"netcoreapp1.0": { + // "dependencies": { + // "Microsoft.NETCore.Portable.Compatibility": "1.0.1", + // "Microsoft.NETCore.App": { + // "type": "platform", + // "version": "1.0.1" + // } + // } + //} } } \ No newline at end of file diff --git a/ThriftSharp.Tests/App.config b/ThriftSharp.Tests/App.config deleted file mode 100644 index 5669988..0000000 --- a/ThriftSharp.Tests/App.config +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/ThriftSharp.Tests/ThriftSharp.Tests.fsproj b/ThriftSharp.Tests/ThriftSharp.Tests.fsproj index 2f6c000..8a513a2 100644 --- a/ThriftSharp.Tests/ThriftSharp.Tests.fsproj +++ b/ThriftSharp.Tests/ThriftSharp.Tests.fsproj @@ -7,8 +7,9 @@ Exe ThriftSharp.Tests ThriftSharp.Tests - v4.6.1 + v4.5.1 true + true @@ -39,8 +40,6 @@ - - @@ -56,11 +55,4 @@ - - - ThriftSharp - {d1275e05-4238-447e-b6ab-f7301aa6cd2e} - True - - \ No newline at end of file diff --git a/ThriftSharp.Tests/ThriftSharp.Tests.project.json b/ThriftSharp.Tests/ThriftSharp.Tests.project.json deleted file mode 100644 index 8a28cc6..0000000 --- a/ThriftSharp.Tests/ThriftSharp.Tests.project.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "runtimes": { - "win": {} - }, - - "frameworks": { - "net451": {} - }, - - "dependencies": { - "System.Net.Http": "4.0.0", - "xunit": "2.1.0", - "xunit.runner.visualstudio": "2.1.0" - } -} \ No newline at end of file diff --git a/ThriftSharp.Tests/project.json b/ThriftSharp.Tests/project.json index 361709c..505e5b6 100644 --- a/ThriftSharp.Tests/project.json +++ b/ThriftSharp.Tests/project.json @@ -1,6 +1,4 @@ { - "version": "5.0.0", - "testRunner": "xunit", "buildOptions": { @@ -26,15 +24,10 @@ }, "dependencies": { - // Fix from https://github.com/dotnet/corefx/pull/10716, which is not yet released - "System.Net.Http": "4.1.1-beta-24423-02", - "System.Reflection": "4.1.0", - "System.Threading.Tasks": "4.0.11", - "Microsoft.NETCore.Portable.Compatibility": "1.0.1", - - "ThriftSharp": "5.0.0", + "ThriftSharp": "5.0.4", "xunit": "2.2.0-beta2-build3300", + "xunit.runner.visualstudio": "2.1.0", "dotnet-test-xunit": "2.2.0-preview2-build1029" }, @@ -47,11 +40,13 @@ }, "frameworks": { - "netcoreapp1.0": { - "dependencies": { - "Microsoft.FSharp.Core.netcore": "1.0.0-alpha-160805" - } - }, + // TODO make this work + //"netcoreapp1.0": { + // "dependencies": { + // "Microsoft.FSharp.Core.netcore": "1.0.0-alpha-160805", + // "Microsoft.NETCore.Portable.Compatibility": "1.0.1" + // } + //}, "net451": { "dependencies": { "FSharp.Core": "4.0.0.1" diff --git a/ThriftSharp.sln b/ThriftSharp.sln index 6103541..d9463b7 100644 --- a/ThriftSharp.sln +++ b/ThriftSharp.sln @@ -3,8 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 VisualStudioVersion = 14.0.25420.1 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ThriftSharp", "ThriftSharp\ThriftSharp.csproj", "{D1275E05-4238-447E-B6AB-F7301AA6CD2E}" -EndProject Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ThriftSharp.Benchmarking", "ThriftSharp.Benchmarking\ThriftSharp.Benchmarking.xproj", "{0421DD45-6D9D-4C27-AD1C-9366FFECB355}" EndProject Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "ThriftSharp.Tests", "ThriftSharp.Tests\ThriftSharp.Tests.fsproj", "{C2E804EC-9B0D-42C7-BD46-E041A3B5ADBF}" @@ -14,16 +12,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution TestSettings.runsettings = TestSettings.runsettings EndProjectSection EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ThriftSharp", "ThriftSharp\ThriftSharp.xproj", "{E9CD2EBC-6EFD-48AE-9FAD-8752F545BFBB}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D1275E05-4238-447E-B6AB-F7301AA6CD2E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D1275E05-4238-447E-B6AB-F7301AA6CD2E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D1275E05-4238-447E-B6AB-F7301AA6CD2E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D1275E05-4238-447E-B6AB-F7301AA6CD2E}.Release|Any CPU.Build.0 = Release|Any CPU {0421DD45-6D9D-4C27-AD1C-9366FFECB355}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0421DD45-6D9D-4C27-AD1C-9366FFECB355}.Debug|Any CPU.Build.0 = Debug|Any CPU {0421DD45-6D9D-4C27-AD1C-9366FFECB355}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -32,6 +28,10 @@ Global {C2E804EC-9B0D-42C7-BD46-E041A3B5ADBF}.Debug|Any CPU.Build.0 = Debug|Any CPU {C2E804EC-9B0D-42C7-BD46-E041A3B5ADBF}.Release|Any CPU.ActiveCfg = Release|Any CPU {C2E804EC-9B0D-42C7-BD46-E041A3B5ADBF}.Release|Any CPU.Build.0 = Release|Any CPU + {E9CD2EBC-6EFD-48AE-9FAD-8752F545BFBB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E9CD2EBC-6EFD-48AE-9FAD-8752F545BFBB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E9CD2EBC-6EFD-48AE-9FAD-8752F545BFBB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E9CD2EBC-6EFD-48AE-9FAD-8752F545BFBB}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/ThriftSharp/Properties/ThriftSharp.rd.xml b/ThriftSharp/Properties/ThriftSharp.rd.xml index 7df817c..cf209dd 100644 --- a/ThriftSharp/Properties/ThriftSharp.rd.xml +++ b/ThriftSharp/Properties/ThriftSharp.rd.xml @@ -1,33 +1,31 @@  - - - - - - + + + + + - - - - - - - - - + + + + - - - - + + + + - - - - + + + + - - - + + + + + + + \ No newline at end of file diff --git a/ThriftSharp/ThriftSharp.csproj b/ThriftSharp/ThriftSharp.csproj deleted file mode 100644 index c2fadca..0000000 --- a/ThriftSharp/ThriftSharp.csproj +++ /dev/null @@ -1,84 +0,0 @@ - - - - - 14.0 - Debug - AnyCPU - {D1275E05-4238-447E-B6AB-F7301AA6CD2E} - Library - Properties - ThriftSharp - ThriftSharp - v5.0 - - 512 - {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - - true - full - false - bin\Debug\netstandard1.3\ - DEBUG;TRACE - prompt - 4 - MinimumRecommendedRules.ruleset - true - - - pdbonly - true - bin\Release\netstandard1.3\ - TRACE - prompt - 4 - true - bin\Release\netstandard1.3\ThriftSharp.xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ThriftSharp/ThriftSharp.xproj b/ThriftSharp/ThriftSharp.xproj index 1171aa7..c12c2d9 100644 --- a/ThriftSharp/ThriftSharp.xproj +++ b/ThriftSharp/ThriftSharp.xproj @@ -1,19 +1,21 @@  - + - 14.0.25420 + 14.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + - 46b8d9a2-cd36-4226-a689-eeb4e857ca1b + e9cd2ebc-6efd-48ae-9fad-8752f545bfbb ThriftSharp .\obj .\bin\ + v4.6.1 2.0 - \ No newline at end of file + diff --git a/ThriftSharp/project.json b/ThriftSharp/project.json index 4b0d736..ad9a413 100644 --- a/ThriftSharp/project.json +++ b/ThriftSharp/project.json @@ -1,5 +1,5 @@ -{ - "version": "5.0.1", +{ + "version": "5.0.4", "title": "Thrift#", "authors": [ "Solal Pirelli" ], @@ -8,15 +8,7 @@ "packOptions": { "projectUrl": "https://github.com/SolalPirelli/ThriftSharp", "licenseUrl": "https://raw.githubusercontent.com/SolalPirelli/ThriftSharp/master/License.txt", - "tags": [ "thrift" ], - - "files": { - "include": "Properties/ThriftSharp.rd.xml", - - "mappings": { - "lib/netstandard1.3/ThriftSharp/Properties/ThriftSharp.rd.xml": "Properties/ThriftSharp.rd.xml" - } - } + "tags": [ "thrift" ] }, "frameworks": { @@ -36,6 +28,29 @@ } }, + "uap10.0": { + "dependencies": { + "System.Collections": "4.0.11", + "System.Collections.Concurrent": "4.0.12", + "System.Linq": "4.1.0", + "System.Linq.Expressions": "4.1.0", + "System.Net.Http": "4.1.0", + "System.Runtime": "4.1.0", + "System.Reflection": "4.1.0", + "System.Reflection.DispatchProxy": "4.0.1", + "System.Reflection.Extensions": "4.0.1", + "System.Runtime.Extensions": "4.1.0", + "System.Text.Encoding": "4.0.11", + "System.Threading.Tasks": "4.0.11" + }, + + "buildOptions": { + "embed": { + "include": "Properties/ThriftSharp.rd.xml" + } + } + }, + "net451": { "dependencies": { "System.Net.Http": "4.0.0"