blob: 655308d5ee05eb70815f227e413d14a043b789b3 [file] [log] [blame]
Jake Farrell29defeb2011-11-10 21:11:46 +00001(*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 *)
19
20
21program client;
22
23{$APPTYPE CONSOLE}
24
25uses
Jake Farrell27274222011-11-10 20:32:44 +000026 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
Jake Farrell29defeb2011-11-10 21:11:46 +000039var
40 nParamCount : Integer;
41 args : array of string;
42 i : Integer;
43 arg : string;
44 s : string;
45
46begin
47 try
48 Writeln( 'Delphi TestClient '+Thrift.Version);
49 nParamCount := ParamCount;
50 SetLength( args, nParamCount);
51 for i := 1 to nParamCount do
52 begin
53 arg := ParamStr( i );
54 args[i-1] := arg;
55 end;
56 TTestClient.Execute( args );
57 Readln;
58 except
59 on E: Exception do
60 Writeln(E.ClassName, ': ', E.Message);
61 end;
62end.
63