THRIFT-4434: .NET Core cleanup and the beginnings of compiler unit tests
Client: netcore
This closes #1449
diff --git a/test/netcore/Client/.gitignore b/test/netcore/Client/.gitignore
new file mode 100644
index 0000000..67d5510
--- /dev/null
+++ b/test/netcore/Client/.gitignore
@@ -0,0 +1,2 @@
+# ignore for autogenerated files
+/ThriftTest
diff --git a/test/netcore/Client/Client.csproj b/test/netcore/Client/Client.csproj
new file mode 100644
index 0000000..4b31a7d
--- /dev/null
+++ b/test/netcore/Client/Client.csproj
@@ -0,0 +1,31 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <TargetFramework>netcoreapp2.0</TargetFramework>
+ <AssemblyName>Client</AssemblyName>
+ <PackageId>Client</PackageId>
+ <OutputType>Exe</OutputType>
+ <GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
+ <GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
+ <GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
+ <GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
+ <GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
+ <GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
+ </PropertyGroup>
+ <ItemGroup>
+ <PackageReference Include="System.Net.Http.WinHttpHandler" Version="[4.4,)" />
+ <PackageReference Include="System.Runtime.Serialization.Primitives" Version="[4.3,)" />
+ <PackageReference Include="System.ServiceModel.Primitives" Version="[4.4,)" />
+ <PackageReference Include="System.Threading" Version="[4.3,)" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\lib\netcore\Thrift\Thrift.csproj" />
+ </ItemGroup>
+ <Target Name="PreBuild" BeforeTargets="_GenerateRestoreProjectSpec;Restore;Compile">
+ <Exec Condition="'$(OS)' == 'Windows_NT'" Command="where thrift" ConsoleToMSBuild="true">
+ <Output TaskParameter="ConsoleOutput" PropertyName="PathToThrift" />
+ </Exec>
+ <Exec Condition="Exists('$(PathToThrift)')" Command="$(PathToThrift) -out $(ProjectDir) -gen netcore:wcf,union,serial,hashcode -r ./../../ThriftTest.thrift" />
+ <Exec Condition="Exists('thrift')" Command="thrift -out $(ProjectDir) -gen netcore:wcf,union,serial,hashcode -r ./../../ThriftTest.thrift" />
+ <Exec Condition="Exists('$(ProjectDir)/../../../compiler/cpp/thrift')" Command="$(ProjectDir)/../../../compiler/cpp/thrift -out $(ProjectDir) -gen netcore:wcf,union,serial,hashcode -r ./../../ThriftTest.thrift" />
+ </Target>
+</Project>
\ No newline at end of file
diff --git a/test/netcore/ThriftTest/Program.cs b/test/netcore/Client/Program.cs
similarity index 82%
copy from test/netcore/ThriftTest/Program.cs
copy to test/netcore/Client/Program.cs
index 94ed9d9..72139d9 100644
--- a/test/netcore/ThriftTest/Program.cs
+++ b/test/netcore/Client/Program.cs
@@ -1,4 +1,4 @@
-// Licensed to the Apache Software Foundation(ASF) under one
+// Licensed to the Apache Software Foundation(ASF) under one
// or more contributor license agreements.See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.The ASF licenses this file
@@ -17,9 +17,9 @@
using System;
using System.Collections.Generic;
-using Test;
+using ThriftTest;
-namespace ThriftTest
+namespace Client
{
public class Program
{
@@ -48,8 +48,6 @@
{
case "client":
return TestClient.Execute(subArgs);
- case "server":
- return TestServer.Execute(subArgs);
case "--help":
PrintHelp();
return 0;
@@ -62,12 +60,10 @@
private static void PrintHelp()
{
Console.WriteLine("Usage:");
- Console.WriteLine(" ThriftTest server [options]'");
- Console.WriteLine(" ThriftTest client [options]'");
- Console.WriteLine(" ThriftTest --help");
+ Console.WriteLine(" Client client [options]'");
+ Console.WriteLine(" Client --help");
Console.WriteLine("");
- TestServer.PrintOptionsHelp();
TestClient.PrintOptionsHelp();
}
}
diff --git a/test/netcore/ThriftTest/Properties/AssemblyInfo.cs b/test/netcore/Client/Properties/AssemblyInfo.cs
similarity index 97%
copy from test/netcore/ThriftTest/Properties/AssemblyInfo.cs
copy to test/netcore/Client/Properties/AssemblyInfo.cs
index efc9e33..157152b 100644
--- a/test/netcore/ThriftTest/Properties/AssemblyInfo.cs
+++ b/test/netcore/Client/Properties/AssemblyInfo.cs
@@ -22,7 +22,7 @@
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
-[assembly: AssemblyTitle("ThriftTest")]
+[assembly: AssemblyTitle("Client")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("The Apache Software Foundation")]
diff --git a/test/netcore/ThriftTest/TestClient.cs b/test/netcore/Client/TestClient.cs
similarity index 92%
rename from test/netcore/ThriftTest/TestClient.cs
rename to test/netcore/Client/TestClient.cs
index f6cc900..8be198c 100644
--- a/test/netcore/ThriftTest/TestClient.cs
+++ b/test/netcore/Client/TestClient.cs
@@ -1,4 +1,4 @@
-// Licensed to the Apache Software Foundation(ASF) under one
+// Licensed to the Apache Software Foundation(ASF) under one
// or more contributor license agreements.See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.The ASF licenses this file
@@ -18,28 +18,29 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
+using System.IO;
using System.Linq;
using System.Net;
using System.Reflection;
using System.Security.Authentication;
using System.Security.Cryptography.X509Certificates;
+using System.ServiceModel;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
-using ThriftAsync.Test;
using Thrift.Collections;
using Thrift.Protocols;
using Thrift.Transports;
using Thrift.Transports.Client;
-namespace Test
+namespace ThriftTest
{
public class TestClient
{
private class TestParams
{
public int numIterations = 1;
- public IPAddress host = IPAddress.Loopback;
+ public IPAddress host = IPAddress.Any;
public int port = 9090;
public int numThreads = 1;
public string url;
@@ -111,11 +112,43 @@
}
else
{
- throw new ArgumentException(args[i]);
+ //throw new ArgumentException(args[i]);
}
}
}
+ private static X509Certificate2 GetClientCert()
+ {
+ var clientCertName = "client.p12";
+ var possiblePaths = new List<string>
+ {
+ "../../../keys/",
+ "../../keys/",
+ "../keys/",
+ "keys/",
+ };
+
+ string existingPath = null;
+ foreach (var possiblePath in possiblePaths)
+ {
+ var path = Path.GetFullPath(possiblePath + clientCertName);
+ if (File.Exists(path))
+ {
+ existingPath = path;
+ break;
+ }
+ }
+
+ if (string.IsNullOrEmpty(existingPath))
+ {
+ throw new FileNotFoundException($"Cannot find file: {clientCertName}");
+ }
+
+ var cert = new X509Certificate2(existingPath, "thrift");
+
+ return cert;
+ }
+
public TClientTransport CreateTransport()
{
if (url == null)
@@ -131,9 +164,16 @@
{
if (encrypted)
{
- var certPath = "../../keys/client.p12";
- var cert = new X509Certificate2(certPath, "thrift");
- trans = new TTlsSocketClientTransport(host, port, 0, cert, (o, c, chain, errors) => true, null, SslProtocols.Tls);
+ var cert = GetClientCert();
+
+ if (cert == null || !cert.HasPrivateKey)
+ {
+ throw new InvalidOperationException("Certificate doesn't contain private key");
+ }
+
+ trans = new TTlsSocketClientTransport(host, port, 0, cert,
+ (sender, certificate, chain, errors) => true,
+ null, SslProtocols.Tls | SslProtocols.Tls11 | SslProtocols.Tls12);
}
else
{
@@ -184,7 +224,7 @@
private class ClientTest
{
private readonly TClientTransport transport;
- private readonly ThriftAsync.Test.ThriftTest.Client client;
+ private readonly ThriftTest.Client client;
private readonly int numIterations;
private bool done;
@@ -193,7 +233,7 @@
public ClientTest(TestParams param)
{
transport = param.CreateTransport();
- client = new ThriftAsync.Test.ThriftTest.Client(param.CreateProtocol(transport));
+ client = new ThriftTest.Client(param.CreateProtocol(transport));
numIterations = param.numIterations;
}
@@ -224,6 +264,14 @@
Console.WriteLine(ex.Message + " ST: " + ex.StackTrace);
continue;
}
+ catch (Exception ex)
+ {
+ Console.WriteLine("*** FAILED ***");
+ Console.WriteLine("Connect failed: " + ex.Message);
+ ReturnCode |= ErrorUnknown;
+ Console.WriteLine(ex.Message + " ST: " + ex.StackTrace);
+ continue;
+ }
try
{
@@ -285,17 +333,14 @@
var tests = Enumerable.Range(0, param.numThreads).Select(_ => new ClientTest(param)).ToArray();
//issue tests on separate threads simultaneously
- var threads = tests.Select(test => new Thread(test.Execute)).ToArray();
+ var threads = tests.Select(test => new Task(test.Execute)).ToArray();
var start = DateTime.Now;
foreach (var t in threads)
{
t.Start();
}
- foreach (var t in threads)
- {
- t.Join();
- }
+ Task.WaitAll(threads);
Console.WriteLine("Total time: " + (DateTime.Now - start));
Console.WriteLine();
@@ -351,7 +396,7 @@
return retval;
}
- public static async Task<int> ExecuteClientTestAsync(ThriftAsync.Test.ThriftTest.Client client)
+ public static async Task<int> ExecuteClientTestAsync(ThriftTest.Client client)
{
var token = CancellationToken.None;
var returnCode = 0;
diff --git a/test/netcore/Makefile.am b/test/netcore/Makefile.am
index e029a24..65833b9 100644
--- a/test/netcore/Makefile.am
+++ b/test/netcore/Makefile.am
@@ -19,41 +19,28 @@
SUBDIRS = .
-THRIFT = $(top_builddir)/compiler/cpp/thrift
-
-GENDIR = ThriftTest/gen-netcore
-
THRIFTCODE = \
- ThriftTest/TestClient.cs \
- ThriftTest/TestServer.cs \
- ThriftTest/Properties/AssemblyInfo.cs \
- ThriftTest/Program.cs
+ ThriftTest.sln
all-local: \
- ThriftTest/stage/ThriftTest.dll
+ ThriftTest/stage/binaries
-ThriftTest/stage/ThriftTest.dll: $(THRIFTCODE)
- $(MKDIR_P) $(GENDIR)
- $(THRIFT) -gen netcore:wcf -r -out $(GENDIR) $(top_srcdir)/test/ThriftTest.thrift
- $(DOTNETCORE) --info
- $(DOTNETCORE) restore
+ThriftTest/stage/binaries: $(THRIFTCODE)
$(DOTNETCORE) build
precross: \
- ThriftTest/stage/ThriftTest.dll
+ ThriftTest/stage/binaries
clean-local:
- $(RM) ThriftTest.exe
- $(RM) -r $(GENDIR)
- $(RM) -r ThriftTest/bin
- $(RM) -r ThriftTest/obj
+ $(RM) -r Client/bin
+ $(RM) -r Server/bin
+ $(RM) -r Client/obj
+ $(RM) -r Server/obj
+ $(RM) -r ThriftTest/ThriftTest
EXTRA_DIST = \
- $(THRIFTCODE) \
ThriftTest.sln \
- ThriftTest/ThriftTest.csproj \
- ThriftTest/Properties/launchSettings.json \
- build.cmd \
- build.sh \
+ Server \
+ Client \
README.md
diff --git a/test/netcore/README.md b/test/netcore/README.md
index 05eb0e2..ed728d1 100644
--- a/test/netcore/README.md
+++ b/test/netcore/README.md
@@ -9,7 +9,10 @@
- NET Core Standard 1.6 (SDK 2.0.0)
# How to build on Windows
+- Get Thrift IDL compiler executable, add to some folder and add path to this folder into PATH variable
- Open ThriftTest.sln in Visual Studio and build
+or
+- Build with scripts
# How to build on Unix
- Ensure you have .NET Core 2.0.0 SDK installed or use the Ubuntu Xenial docker image
diff --git a/test/netcore/Server/.gitignore b/test/netcore/Server/.gitignore
new file mode 100644
index 0000000..67d5510
--- /dev/null
+++ b/test/netcore/Server/.gitignore
@@ -0,0 +1,2 @@
+# ignore for autogenerated files
+/ThriftTest
diff --git a/test/netcore/ThriftTest/Program.cs b/test/netcore/Server/Program.cs
similarity index 82%
rename from test/netcore/ThriftTest/Program.cs
rename to test/netcore/Server/Program.cs
index 94ed9d9..e647e5b 100644
--- a/test/netcore/ThriftTest/Program.cs
+++ b/test/netcore/Server/Program.cs
@@ -1,4 +1,4 @@
-// Licensed to the Apache Software Foundation(ASF) under one
+// Licensed to the Apache Software Foundation(ASF) under one
// or more contributor license agreements.See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.The ASF licenses this file
@@ -17,9 +17,9 @@
using System;
using System.Collections.Generic;
-using Test;
+using ThriftTest;
-namespace ThriftTest
+namespace Server
{
public class Program
{
@@ -46,8 +46,6 @@
// run whatever mode is choosen
switch(firstArg)
{
- case "client":
- return TestClient.Execute(subArgs);
case "server":
return TestServer.Execute(subArgs);
case "--help":
@@ -62,13 +60,11 @@
private static void PrintHelp()
{
Console.WriteLine("Usage:");
- Console.WriteLine(" ThriftTest server [options]'");
- Console.WriteLine(" ThriftTest client [options]'");
- Console.WriteLine(" ThriftTest --help");
+ Console.WriteLine(" Server server [options]'");
+ Console.WriteLine(" Server --help");
Console.WriteLine("");
TestServer.PrintOptionsHelp();
- TestClient.PrintOptionsHelp();
}
}
}
diff --git a/test/netcore/ThriftTest/Properties/AssemblyInfo.cs b/test/netcore/Server/Properties/AssemblyInfo.cs
similarity index 97%
rename from test/netcore/ThriftTest/Properties/AssemblyInfo.cs
rename to test/netcore/Server/Properties/AssemblyInfo.cs
index efc9e33..265495c 100644
--- a/test/netcore/ThriftTest/Properties/AssemblyInfo.cs
+++ b/test/netcore/Server/Properties/AssemblyInfo.cs
@@ -22,7 +22,7 @@
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
-[assembly: AssemblyTitle("ThriftTest")]
+[assembly: AssemblyTitle("Server")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("The Apache Software Foundation")]
diff --git a/test/netcore/Server/Server.csproj b/test/netcore/Server/Server.csproj
new file mode 100644
index 0000000..ad2fb7c
--- /dev/null
+++ b/test/netcore/Server/Server.csproj
@@ -0,0 +1,31 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <TargetFramework>netcoreapp2.0</TargetFramework>
+ <AssemblyName>Server</AssemblyName>
+ <PackageId>Server</PackageId>
+ <OutputType>Exe</OutputType>
+ <GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
+ <GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
+ <GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
+ <GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
+ <GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
+ <GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
+ </PropertyGroup>
+ <ItemGroup>
+ <PackageReference Include="System.Net.Http.WinHttpHandler" Version="[4.4,)" />
+ <PackageReference Include="System.Runtime.Serialization.Primitives" Version="[4.3,)" />
+ <PackageReference Include="System.ServiceModel.Primitives" Version="[4.4,)" />
+ <PackageReference Include="System.Threading" Version="[4.3,)" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\lib\netcore\Thrift\Thrift.csproj" />
+ </ItemGroup>
+ <Target Name="PreBuild" BeforeTargets="_GenerateRestoreProjectSpec;Restore;Compile">
+ <Exec Condition="'$(OS)' == 'Windows_NT'" Command="where thrift" ConsoleToMSBuild="true">
+ <Output TaskParameter="ConsoleOutput" PropertyName="PathToThrift" />
+ </Exec>
+ <Exec Condition="Exists('$(PathToThrift)')" Command="$(PathToThrift) -out $(ProjectDir) -gen netcore:wcf,union,serial,hashcode -r ./../../ThriftTest.thrift" />
+ <Exec Condition="Exists('thrift')" Command="thrift -out $(ProjectDir) -gen netcore:wcf,union,serial,hashcode -r ./../../ThriftTest.thrift" />
+ <Exec Condition="Exists('$(ProjectDir)/../../../compiler/cpp/thrift')" Command="$(ProjectDir)/../../../compiler/cpp/thrift -out $(ProjectDir) -gen netcore:wcf,union,serial,hashcode -r ./../../ThriftTest.thrift" />
+ </Target>
+</Project>
\ No newline at end of file
diff --git a/test/netcore/ThriftTest/TestServer.cs b/test/netcore/Server/TestServer.cs
similarity index 89%
rename from test/netcore/ThriftTest/TestServer.cs
rename to test/netcore/Server/TestServer.cs
index aa25c91..bfd3335 100644
--- a/test/netcore/ThriftTest/TestServer.cs
+++ b/test/netcore/Server/TestServer.cs
@@ -1,4 +1,4 @@
-// Licensed to the Apache Software Foundation(ASF) under one
+// Licensed to the Apache Software Foundation(ASF) under one
// or more contributor license agreements.See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.The ASF licenses this file
@@ -17,13 +17,14 @@
using System;
using System.Collections.Generic;
+using System.IO;
+using System.Linq;
using System.Security.Authentication;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
-using ThriftAsync.Test;
using Thrift;
using Thrift.Collections;
using Thrift.Protocols;
@@ -31,7 +32,7 @@
using Thrift.Transports;
using Thrift.Transports.Server;
-namespace Test
+namespace ThriftTest
{
internal class ServerParam
{
@@ -93,7 +94,7 @@
}
else
{
- throw new ArgumentException(args[i]);
+ //throw new ArgumentException(args[i]);
}
}
@@ -132,9 +133,9 @@
callCount++;
return Task.CompletedTask;
}
- };
+ }
- public class TestHandlerAsync : ThriftAsync.Test.ThriftTest.IAsync
+ public class TestHandlerAsync : ThriftTest.IAsync
{
public TBaseServer server { get; set; }
private int handlerID;
@@ -439,20 +440,13 @@
public Task testOnewayAsync(int secondsToSleep, CancellationToken cancellationToken)
{
logger.Invoke("testOneway({0}), sleeping...", secondsToSleep);
- Thread.Sleep(secondsToSleep * 1000);
+ Task.Delay(secondsToSleep * 1000, cancellationToken).GetAwaiter().GetResult();
logger.Invoke("testOneway finished");
return Task.CompletedTask;
}
}
-
- private enum ProcessorFactoryType
- {
- TSingletonProcessorFactory,
- TPrototypeProcessorFactory,
- }
-
internal static void PrintOptionsHelp()
{
Console.WriteLine("Server options:");
@@ -466,8 +460,41 @@
Console.WriteLine();
}
+ private static X509Certificate2 GetServerCert()
+ {
+ var serverCertName = "server.p12";
+ var possiblePaths = new List<string>
+ {
+ "../../../keys/",
+ "../../keys/",
+ "../keys/",
+ "keys/",
+ };
+
+ string existingPath = null;
+ foreach (var possiblePath in possiblePaths)
+ {
+ var path = Path.GetFullPath(possiblePath + serverCertName);
+ if (File.Exists(path))
+ {
+ existingPath = path;
+ break;
+ }
+ }
+
+ if (string.IsNullOrEmpty(existingPath))
+ {
+ throw new FileNotFoundException($"Cannot find file: {serverCertName}");
+ }
+
+ var cert = new X509Certificate2(existingPath, "thrift");
+
+ return cert;
+ }
+
public static int Execute(List<string> args)
{
+ var loggerFactory = new LoggerFactory();//.AddConsole().AddDebug();
var logger = new LoggerFactory().CreateLogger("Test");
try
@@ -493,16 +520,28 @@
{
trans = new TNamedPipeServerTransport(param.pipe);
}
+// else if (param.useFramed)
+// {
+// trans = new TServerFramedTransport(param.port);
+// }
else
{
if (param.useEncryption)
{
- var certPath = "../../keys/server.p12";
- trans = new TTlsServerSocketTransport(param.port, param.useBufferedSockets, new X509Certificate2(certPath, "thrift"), null, null, SslProtocols.Tls);
+ var cert = GetServerCert();
+
+ if (cert == null || !cert.HasPrivateKey)
+ {
+ throw new InvalidOperationException("Certificate doesn't contain private key");
+ }
+
+ trans = new TTlsServerSocketTransport(param.port, param.useBufferedSockets, param.useFramed, cert,
+ (sender, certificate, chain, errors) => true,
+ null, SslProtocols.Tls | SslProtocols.Tls11 | SslProtocols.Tls12);
}
else
{
- trans = new TServerSocketTransport(param.port, 0, param.useBufferedSockets);
+ trans = new TServerSocketTransport(param.port, 0, param.useBufferedSockets, param.useFramed);
}
}
@@ -518,15 +557,10 @@
// Processor
var testHandler = new TestHandlerAsync();
- var testProcessor = new ThriftAsync.Test.ThriftTest.AsyncProcessor(testHandler);
+ var testProcessor = new ThriftTest.AsyncProcessor(testHandler);
processorFactory = new SingletonTProcessorFactory(testProcessor);
-
- TTransportFactory transFactory;
- if (param.useFramed)
- throw new NotImplementedException("framed"); // transFactory = new TFramedTransport.Factory();
- else
- transFactory = new TTransportFactory();
+ TTransportFactory transFactory = new TTransportFactory();
TBaseServer serverEngine = new AsyncBaseServer(processorFactory, trans, transFactory, transFactory, proto, proto, logger);
diff --git a/test/netcore/ThriftTest.sln b/test/netcore/ThriftTest.sln
index c3f194b..2ab241a 100644
--- a/test/netcore/ThriftTest.sln
+++ b/test/netcore/ThriftTest.sln
@@ -1,11 +1,13 @@
-Microsoft Visual Studio Solution File, Format Version 12.00
+Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26730.12
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ThriftTest", "ThriftTest\ThriftTest.csproj", "{DDED46FF-F359-47B4-BA7E-9B70F216BD44}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Thrift", "..\..\lib\netcore\Thrift\Thrift.csproj", "{C20EA2A9-7660-47DE-9A49-D1EF12FB2895}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Client", "Client\Client.csproj", "{21039F25-6ED7-4E80-A545-EBC93472EBD1}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Server", "Server\Server.csproj", "{0C6E8685-F191-4479-9842-882A38961127}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -16,18 +18,6 @@
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {DDED46FF-F359-47B4-BA7E-9B70F216BD44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {DDED46FF-F359-47B4-BA7E-9B70F216BD44}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {DDED46FF-F359-47B4-BA7E-9B70F216BD44}.Debug|x64.ActiveCfg = Debug|Any CPU
- {DDED46FF-F359-47B4-BA7E-9B70F216BD44}.Debug|x64.Build.0 = Debug|Any CPU
- {DDED46FF-F359-47B4-BA7E-9B70F216BD44}.Debug|x86.ActiveCfg = Debug|Any CPU
- {DDED46FF-F359-47B4-BA7E-9B70F216BD44}.Debug|x86.Build.0 = Debug|Any CPU
- {DDED46FF-F359-47B4-BA7E-9B70F216BD44}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {DDED46FF-F359-47B4-BA7E-9B70F216BD44}.Release|Any CPU.Build.0 = Release|Any CPU
- {DDED46FF-F359-47B4-BA7E-9B70F216BD44}.Release|x64.ActiveCfg = Release|Any CPU
- {DDED46FF-F359-47B4-BA7E-9B70F216BD44}.Release|x64.Build.0 = Release|Any CPU
- {DDED46FF-F359-47B4-BA7E-9B70F216BD44}.Release|x86.ActiveCfg = Release|Any CPU
- {DDED46FF-F359-47B4-BA7E-9B70F216BD44}.Release|x86.Build.0 = Release|Any CPU
{C20EA2A9-7660-47DE-9A49-D1EF12FB2895}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C20EA2A9-7660-47DE-9A49-D1EF12FB2895}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C20EA2A9-7660-47DE-9A49-D1EF12FB2895}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -40,6 +30,30 @@
{C20EA2A9-7660-47DE-9A49-D1EF12FB2895}.Release|x64.Build.0 = Release|Any CPU
{C20EA2A9-7660-47DE-9A49-D1EF12FB2895}.Release|x86.ActiveCfg = Release|Any CPU
{C20EA2A9-7660-47DE-9A49-D1EF12FB2895}.Release|x86.Build.0 = Release|Any CPU
+ {21039F25-6ED7-4E80-A545-EBC93472EBD1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {21039F25-6ED7-4E80-A545-EBC93472EBD1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {21039F25-6ED7-4E80-A545-EBC93472EBD1}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {21039F25-6ED7-4E80-A545-EBC93472EBD1}.Debug|x64.Build.0 = Debug|Any CPU
+ {21039F25-6ED7-4E80-A545-EBC93472EBD1}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {21039F25-6ED7-4E80-A545-EBC93472EBD1}.Debug|x86.Build.0 = Debug|Any CPU
+ {21039F25-6ED7-4E80-A545-EBC93472EBD1}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {21039F25-6ED7-4E80-A545-EBC93472EBD1}.Release|Any CPU.Build.0 = Release|Any CPU
+ {21039F25-6ED7-4E80-A545-EBC93472EBD1}.Release|x64.ActiveCfg = Release|Any CPU
+ {21039F25-6ED7-4E80-A545-EBC93472EBD1}.Release|x64.Build.0 = Release|Any CPU
+ {21039F25-6ED7-4E80-A545-EBC93472EBD1}.Release|x86.ActiveCfg = Release|Any CPU
+ {21039F25-6ED7-4E80-A545-EBC93472EBD1}.Release|x86.Build.0 = Release|Any CPU
+ {0C6E8685-F191-4479-9842-882A38961127}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0C6E8685-F191-4479-9842-882A38961127}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0C6E8685-F191-4479-9842-882A38961127}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {0C6E8685-F191-4479-9842-882A38961127}.Debug|x64.Build.0 = Debug|Any CPU
+ {0C6E8685-F191-4479-9842-882A38961127}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {0C6E8685-F191-4479-9842-882A38961127}.Debug|x86.Build.0 = Debug|Any CPU
+ {0C6E8685-F191-4479-9842-882A38961127}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0C6E8685-F191-4479-9842-882A38961127}.Release|Any CPU.Build.0 = Release|Any CPU
+ {0C6E8685-F191-4479-9842-882A38961127}.Release|x64.ActiveCfg = Release|Any CPU
+ {0C6E8685-F191-4479-9842-882A38961127}.Release|x64.Build.0 = Release|Any CPU
+ {0C6E8685-F191-4479-9842-882A38961127}.Release|x86.ActiveCfg = Release|Any CPU
+ {0C6E8685-F191-4479-9842-882A38961127}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/test/netcore/ThriftTest/Properties/launchSettings.json b/test/netcore/ThriftTest/Properties/launchSettings.json
deleted file mode 100644
index ddafa79..0000000
--- a/test/netcore/ThriftTest/Properties/launchSettings.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "profiles": {
- "ThriftTest": {
- "commandName": "Project"
- }
- }
-}
\ No newline at end of file
diff --git a/test/netcore/ThriftTest/ThriftTest.csproj b/test/netcore/ThriftTest/ThriftTest.csproj
deleted file mode 100644
index 6647101..0000000
--- a/test/netcore/ThriftTest/ThriftTest.csproj
+++ /dev/null
@@ -1,27 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-
- <PropertyGroup>
- <TargetFramework>netcoreapp2.0</TargetFramework>
- <AssemblyName>ThriftTest</AssemblyName>
- <PackageId>ThriftTest</PackageId>
- <OutputType>Exe</OutputType>
- <GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
- <GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
- <GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
- <GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
- <GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
- <GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
- </PropertyGroup>
-
- <ItemGroup>
- <PackageReference Include="System.Net.Http.WinHttpHandler" Version="[4.4,)" />
- <PackageReference Include="System.Runtime.Serialization.Primitives" Version="[4.3,)" />
- <PackageReference Include="System.ServiceModel.Primitives" Version="[4.4,)" />
- <PackageReference Include="System.Threading" Version="[4.3,)" />
- </ItemGroup>
-
- <ItemGroup>
- <ProjectReference Include="..\..\..\lib\netcore\Thrift\Thrift.csproj" />
- </ItemGroup>
-
-</Project>
diff --git a/test/netcore/build.cmd b/test/netcore/build.cmd
index e971799..9b84ef2 100644
--- a/test/netcore/build.cmd
+++ b/test/netcore/build.cmd
@@ -19,12 +19,7 @@
rem */
setlocal
-cd Interfaces
-thrift -gen netcore:wcf -r ..\..\tutorial.thrift
-cd ..
-
dotnet --info
-dotnet restore
dotnet build
:eof
diff --git a/test/netcore/build.sh b/test/netcore/build.sh
index 626635c..c97e310 100755
--- a/test/netcore/build.sh
+++ b/test/netcore/build.sh
@@ -22,10 +22,5 @@
#exit if any command fails
set -e
-cd ThriftTest
-../../../compiler/cpp/thrift -gen netcore:wcf -r ../../ThriftTest.thrift
-cd ..
-
dotnet --info
-dotnet restore
dotnet build