THRIFT-4982 Remove deprecated C# bindings from the code base
Client: csharp
Patch: Jens Geyer
This closes #2027
diff --git a/test/netstd/Client/Program.cs b/test/netstd/Client/Program.cs
index 92000da..0fe2cce 100644
--- a/test/netstd/Client/Program.cs
+++ b/test/netstd/Client/Program.cs
@@ -17,6 +17,7 @@
using System;
using System.Collections.Generic;
+using System.Linq;
using ThriftTest;
namespace Client
@@ -35,13 +36,13 @@
}
// run whatever mode is choosen, default to test impl
- var firstArg = args.Length > 0 ? args[0] : string.Empty;
- switch (firstArg)
+ var argslist = new List<string>(args);
+ switch (argslist.FirstOrDefault())
{
- case "client":
- Console.WriteLine("The 'client' argument is no longer required.");
- PrintHelp();
- return -1;
+ case "client": // crosstest wants to pass this, so just emit a hint and ignore
+ Console.WriteLine("Hint: The 'client' argument is no longer required.");
+ argslist.RemoveAt(0);
+ return TestClient.Execute(argslist);
case "--performance":
case "--performance-test":
return Tests.PerformanceTests.Execute();
@@ -49,7 +50,7 @@
PrintHelp();
return 0;
default:
- return TestClient.Execute(new List<string>(args));
+ return TestClient.Execute(argslist);
}
}
diff --git a/test/netstd/Makefile.am b/test/netstd/Makefile.am
index 376ffb7..9712fc2 100644
--- a/test/netstd/Makefile.am
+++ b/test/netstd/Makefile.am
@@ -20,10 +20,10 @@
SUBDIRS = .
all-local:
- $(DOTNETCORE) build
+ $(DOTNETCORE) build -c Release
precross:
- $(DOTNETCORE) build
+ $(DOTNETCORE) build -c Release
clean-local:
$(RM) -r Client/bin
diff --git a/test/netstd/Server/Program.cs b/test/netstd/Server/Program.cs
index 1b8ffd4..8414b48 100644
--- a/test/netstd/Server/Program.cs
+++ b/test/netstd/Server/Program.cs
@@ -16,6 +16,7 @@
// under the License.
using System;
+using System.Linq;
using System.Collections.Generic;
using ThriftTest;
@@ -35,18 +36,18 @@
}
// run whatever mode is choosen, default to test impl
- var firstArg = args.Length > 0 ? args[0] : string.Empty;
- switch (firstArg)
+ var argslist = new List<string>(args);
+ switch (argslist.FirstOrDefault())
{
- case "server":
- Console.WriteLine("The 'server' argument is no longer required.");
- PrintHelp();
- return -1;
+ case "server": // crosstest wants to pass this, so just emit a hint and ignore
+ Console.WriteLine("Hint: The 'server' argument is no longer required.");
+ argslist.RemoveAt(0);
+ return TestServer.Execute(argslist);
case "--help":
PrintHelp();
return 0;
default:
- return TestServer.Execute(new List<string>( args));
+ return TestServer.Execute(argslist);
}
}