blob: 09bd84f9cabf51f5148918b6627e052884c7f553 [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;
7using System.Collections.Generic;
8using System.Text;
9using Thrift.Transport;
10using Thrift.Protocol;
11using Thrift.Test; //generated code
12
13namespace Test
14{
15 class Program
16 {
17 static void Main(string[] args)
18 {
19 if (args.Length == 0)
20 {
21 Console.WriteLine("must provide 'server' or 'client' arg");
22 return;
23 }
24
25 string[] subArgs = new string[args.Length - 1];
26 for(int i = 1; i < args.Length; i++)
27 {
28 subArgs[i-1] = args[i];
29 }
30 if (args[0] == "client")
31 {
32 TestClient.Execute(subArgs);
33 }
34 else if (args[0] == "server")
35 {
36 TestServer.Execute(subArgs);
37 }
38 else
39 {
40 Console.WriteLine("first argument must be 'server' or 'client'");
41 }
42 }
43 }
44}