Skip to content

Commit

Permalink
Fix rd.xml file inclusion.
Browse files Browse the repository at this point in the history
  • Loading branch information
SolalPirelli committed Sep 27, 2016
1 parent e9c5d9c commit 9fa797f
Show file tree
Hide file tree
Showing 11 changed files with 87 additions and 202 deletions.
8 changes: 1 addition & 7 deletions ThriftSharp.Benchmarking/MemoryBuffer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,7 @@ public static ArraySegment<byte> Serialize<T>( T obj )
var buffer = new MemoryBuffer() { _memory = new MemoryStream() };
ThriftStructWriter.Write( obj, new ThriftBinaryProtocol( buffer ) );

ArraySegment<byte> result;
if( buffer._memory.TryGetBuffer( out result ) )
{
return result;
}

throw new Exception( "What now?" );
return new ArraySegment<byte>( buffer._memory.GetBuffer() );
}

public static T Deserialize<T>( ArraySegment<byte> bytes )
Expand Down
30 changes: 13 additions & 17 deletions ThriftSharp.Benchmarking/project.json
Original file line number Diff line number Diff line change
@@ -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"
// }
// }
//}
}
}
8 changes: 0 additions & 8 deletions ThriftSharp.Tests/App.config

This file was deleted.

12 changes: 2 additions & 10 deletions ThriftSharp.Tests/ThriftSharp.Tests.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
<OutputType>Exe</OutputType>
<RootNamespace>ThriftSharp.Tests</RootNamespace>
<AssemblyName>ThriftSharp.Tests</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down Expand Up @@ -39,8 +40,6 @@
</When>
</Choose>
<ItemGroup>
<Content Include="App.config" />
<None Include="ThriftSharp.Tests.project.json" />
<None Include="project.json" />
<Compile Include="Internals\MemoryProtocol.fs" />
<Compile Include="Internals\MemoryTransport.fs" />
Expand All @@ -56,11 +55,4 @@
<Compile Include="Communication.fs" />
<Compile Include="ParametersValidation.fs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ThriftSharp\ThriftSharp.csproj">
<Name>ThriftSharp</Name>
<Project>{d1275e05-4238-447e-b6ab-f7301aa6cd2e}</Project>
<Private>True</Private>
</ProjectReference>
</ItemGroup>
</Project>
15 changes: 0 additions & 15 deletions ThriftSharp.Tests/ThriftSharp.Tests.project.json

This file was deleted.

23 changes: 9 additions & 14 deletions ThriftSharp.Tests/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"version": "5.0.0",

"testRunner": "xunit",

"buildOptions": {
Expand All @@ -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"
},

Expand All @@ -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"
Expand Down
12 changes: 6 additions & 6 deletions ThriftSharp.sln
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand All @@ -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
Expand All @@ -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
Expand Down
50 changes: 24 additions & 26 deletions ThriftSharp/Properties/ThriftSharp.rd.xml
Original file line number Diff line number Diff line change
@@ -1,33 +1,31 @@
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
<Library>
<Assembly Name="ThriftSharp">
<!-- Called by the generated expressions to read structs -->
<Type Name="ThriftSharp.Internals.ThriftStructReader">
<Method Name="Read{T}" Dynamic="Required" />
</Type>
<Library Name="ThriftSharp">
<!-- Called by the generated expressions to read structs -->
<Type Name="ThriftSharp.Internals.ThriftStructReader">
<Method Name="Read{T}" Dynamic="Required" />
</Type>

<!-- Called by the generated expressions to write structs -->
<Type Name="ThriftSharp.Internals.ThriftStructWriter">
<Method Name="Write{T}" Dynamic="Required" />
</Type>

<!-- Called by the proxy -->
<Type Name="ThriftSharp.Internals.Thrift">
<Method Name="CallMethodAsync" Dynamic="Required" />
</Type>
<!-- Called by the generated expressions to write structs -->
<Type Name="ThriftSharp.Internals.ThriftStructWriter">
<Method Name="Write{T}" Dynamic="Required" />
</Type>

<!-- Reflection is used to get/set properties and instantiate Thrift structs -->
<Type Name="ThriftSharp.ThriftStructAttribute">
<AttributeImplies Dynamic="Required All" />
</Type>
<!-- Called by the proxy -->
<Type Name="ThriftSharp.Internals.Thrift">
<Method Name="CallMethodAsync" Dynamic="Required" />
</Type>

<!-- Reflection is used to read methods of Thrift services -->
<Type Name="ThriftSharp.ThriftServiceAttribute">
<AttributeImplies Browse="All" />
</Type>
<!-- Reflection is used to get/set properties and instantiate Thrift structs -->
<Type Name="ThriftSharp.ThriftStructAttribute">
<AttributeImplies Dynamic="Required All" />
</Type>

<!-- Converters are instantiated, their methods are called, and their interface implementations are read -->
<Type Name="ThriftSharp.IThriftValueConverter`2" Dynamic="Required All" />
</Assembly>
<!-- Reflection is used to read methods of Thrift services -->
<Type Name="ThriftSharp.ThriftServiceAttribute">
<AttributeImplies Browse="All" />
</Type>

<!-- Converters are instantiated, their methods are called, and their interface implementations are read -->
<Type Name="ThriftSharp.IThriftValueConverter`2" Dynamic="Required All" />
</Library>
</Directives>
84 changes: 0 additions & 84 deletions ThriftSharp/ThriftSharp.csproj

This file was deleted.

10 changes: 6 additions & 4 deletions ThriftSharp/ThriftSharp.xproj
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0.25420" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0.25420</VisualStudioVersion>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>

<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals">
<ProjectGuid>46b8d9a2-cd36-4226-a689-eeb4e857ca1b</ProjectGuid>
<ProjectGuid>e9cd2ebc-6efd-48ae-9fad-8752f545bfbb</ProjectGuid>
<RootNamespace>ThriftSharp</RootNamespace>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
</PropertyGroup>

<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>
</Project>
Loading

0 comments on commit 9fa797f

Please sign in to comment.