THRIFT-3361 Improve C# library
Client: C#
Patch: Nobuaki Sukegawa <nsukeg@gmail.com>
This closes #630
diff --git a/lib/csharp/test/ThriftTest/TestServer.cs b/lib/csharp/test/ThriftTest/TestServer.cs
index b5cc73c..b3a8e42 100644
--- a/lib/csharp/test/ThriftTest/TestServer.cs
+++ b/lib/csharp/test/ThriftTest/TestServer.cs
@@ -69,7 +69,7 @@
public string testString(string thing)
{
- Console.WriteLine("teststring(\"" + thing + "\")");
+ Console.WriteLine("testString(\"" + thing + "\")");
return thing;
}
@@ -145,9 +145,9 @@
}
else
{
- Console.WriteLine(", ");
+ Console.Write(", ");
}
- Console.WriteLine(key + " => " + thing[key]);
+ Console.Write(key + " => " + thing[key]);
}
Console.WriteLine("})");
return thing;
@@ -165,9 +165,9 @@
}
else
{
- Console.WriteLine(", ");
+ Console.Write(", ");
}
- Console.WriteLine(key + " => " + thing[key]);
+ Console.Write(key + " => " + thing[key]);
}
Console.WriteLine("})");
return thing;
@@ -185,9 +185,9 @@
}
else
{
- Console.WriteLine(", ");
+ Console.Write(", ");
}
- Console.WriteLine(elem);
+ Console.Write(elem);
}
Console.WriteLine("})");
return thing;
@@ -205,9 +205,9 @@
}
else
{
- Console.WriteLine(", ");
+ Console.Write(", ");
}
- Console.WriteLine(elem);
+ Console.Write(elem);
}
Console.WriteLine("})");
return thing;
@@ -371,7 +371,6 @@
bool useBufferedSockets = false, useFramed = false, useEncryption = false, compact = false, json = false;
int port = 9090;
string pipe = null;
- string certPath = "../../../../../keys/server.pem";
for (int i = 0; i < args.Length; i++)
{
if (args[i] == "-pipe") // -pipe name
@@ -402,10 +401,6 @@
{
useEncryption = true;
}
- else if (args[i].StartsWith("--cert="))
- {
- certPath = args[i].Substring("--cert=".Length);
- }
}
// Processor
@@ -422,7 +417,8 @@
{
if (useEncryption)
{
- trans = new TTLSServerSocket(port, 0, useBufferedSockets, new X509Certificate2(certPath));
+ string certPath = "../../../../test/keys/server.p12";
+ trans = new TTLSServerSocket(port, 0, useBufferedSockets, new X509Certificate2(certPath, "thrift"));
}
else
{