THRIFT-1489 Add support for WCF bindings (optionally) to C# compiler, allowing web service usage of Thrift generated code
Patch: Kieran Benton

changes by roger:
- use ServiceModel, DataContract only when wcf is enabled
- indent space vs tab
- remove issue on lib/cpp/README_WINDOWS
- add testStringMap on test/csharp/ThriftTest/TestServer.cs
- add build to test/csharp/ThriftTest/maketest.sh

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1232578 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/test/csharp/ThriftTest/TestServer.cs b/test/csharp/ThriftTest/TestServer.cs
old mode 100644
new mode 100755
index 894ec9c..6fb75f4
--- a/test/csharp/ThriftTest/TestServer.cs
+++ b/test/csharp/ThriftTest/TestServer.cs
@@ -115,7 +115,27 @@
 				}
 				Console.WriteLine("})");
 				return thing;
-			}
+			}

+

+            public Dictionary<string, string> testStringMap(Dictionary<string, string> thing)

+            {

+                Console.WriteLine("testStringMap({");

+                bool first = true;

+                foreach (string key in thing.Keys)

+                {

+                    if (first)

+                    {

+                        first = false;

+                    }

+                    else

+                    {

+                        Console.WriteLine(", ");

+                    }

+                    Console.WriteLine(key + " => " + thing[key]);

+                }

+                Console.WriteLine("})");

+                return thing;

+            }
 
 			public THashSet<int> testSet(THashSet<int> thing)
 			{
diff --git a/test/csharp/ThriftTest/maketest.sh b/test/csharp/ThriftTest/maketest.sh
index 5580de8..e11b5b2 100755
--- a/test/csharp/ThriftTest/maketest.sh
+++ b/test/csharp/ThriftTest/maketest.sh
@@ -21,3 +21,9 @@
 
 ../../../compiler/cpp/thrift --gen csharp -o . ../../ThriftTest.thrift
 gmcs /t:library /out:./ThriftImpl.dll /recurse:./gen-csharp/* /reference:../../../lib/csharp/Thrift.dll
+gmcs  /out:TestClientServer.exe /reference:../../../lib/csharp/Thrift.dll /reference:ThriftImpl.dll TestClient.cs TestServer.cs Program.cs
+
+export MONO_PATH=../../../lib/csharp/
+
+timeout 120 ./TestClientServer.exe server &
+./TestClientServer.exe client