blob: 38605256cfc2a0aba08e0044881ed8d9ed664776 [file] [log] [blame]
David Reiss63191332009-01-06 19:49:22 +00001// Distributed under the Thrift Software License
2//
3// See accompanying file LICENSE or visit the Thrift site at:
4// http://developers.facebook.com/thrift/
5
6using System;
David Reiss63191332009-01-06 19:49:22 +00007using Thrift.Transport;
8using Thrift.Protocol;
9using Thrift.Test; //generated code
10
11namespace Test
12{
13 class Program
14 {
15 static void Main(string[] args)
16 {
17 if (args.Length == 0)
18 {
19 Console.WriteLine("must provide 'server' or 'client' arg");
20 return;
21 }
22
23 string[] subArgs = new string[args.Length - 1];
24 for(int i = 1; i < args.Length; i++)
25 {
26 subArgs[i-1] = args[i];
27 }
28 if (args[0] == "client")
29 {
30 TestClient.Execute(subArgs);
31 }
32 else if (args[0] == "server")
33 {
34 TestServer.Execute(subArgs);
35 }
36 else
37 {
38 Console.WriteLine("first argument must be 'server' or 'client'");
39 }
40 }
41 }
42}