blob: 310e9662553085021a31e8557a269ae1b481a248 [file] [log] [blame]
Jake Farrell27274222011-11-10 20:32:44 +00001(*g
2 * Licensed to the Apache Software Foundation (ASF) under oneg
3 * or more contributor license agreements. See the NOTICE fileg
4 * distributed with this work for additional informationg
5 * regarding copyright ownership. The ASF licenses this fileg
6 * to you under the Apache License, Version 2.0 (theg
7 * "License"); you may not use this file except in complianceg
8 * with the License. You may obtain a copy of the License atg
9 *g
10 * http://www.apache.org/licenses/LICENSE-2.0g
11 *g
12 * Unless required by applicable law or agreed to in writing,g
13 * software distributed under the License is distributed on ang
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANYg
15 * KIND, either express or implied. See the License for theg
16 * specific language governing permissions and limitationsg
17 * under the License.g
18 *)g
19g
20g
21program client;g
22g
23{$APPTYPE CONSOLE}g
24g
25usesg
26 SysUtils,
27 TestClient in 'TestClient.pas',
28 Thrift.Test in 'gen-delphi\Thrift.Test.pas',
29 Thrift in '..\..\..\lib\delphi\src\Thrift.pas',
30 Thrift.Transport in '..\..\..\lib\delphi\src\Thrift.Transport.pas',
31 Thrift.Protocol in '..\..\..\lib\delphi\src\Thrift.Protocol.pas',
32 Thrift.Protocol.JSON in '..\..\..\lib\delphi\src\Thrift.Protocol.JSON.pas',
33 Thrift.Collections in '..\..\..\lib\delphi\src\Thrift.Collections.pas',
34 Thrift.Server in '..\..\..\lib\delphi\src\Thrift.Server.pas',
35 Thrift.Stream in '..\..\..\lib\delphi\src\Thrift.Stream.pas',
36 Thrift.Console in '..\..\..\lib\delphi\src\Thrift.Console.pas',
37 Thrift.Utils in '..\..\..\lib\delphi\src\Thrift.Utils.pas';
38
39varg
40 nParamCount : Integer;g
41 args : array of string;g
42 i : Integer;g
43 arg : string;g
44 s : string;g
45g
46beging
47 tryg
48 Writeln( 'Delphi TestClient '+Thrift.Version);g
49 nParamCount := ParamCount;g
50 SetLength( args, nParamCount);g
51 for i := 1 to nParamCount dog
52 beging
53 arg := ParamStr( i );g
54 args[i-1] := arg;g
55 end;g
56 TTestClient.Execute( args );g
57 Readln;g
58 exceptg
59 on E: Exception dog
60 Writeln(E.ClassName, ': ', E.Message);g
61 end;g
62end.g
63g