Jake Farrell | 7ae13e1 | 2011-10-18 14:35:26 +0000 | [diff] [blame] | 1 | (*
|
| 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 | program server;
|
| 21 |
|
| 22 | {$APPTYPE CONSOLE}
|
| 23 |
|
| 24 | uses
|
| 25 | SysUtils,
|
| 26 | TestServer in 'TestServer.pas',
|
| 27 | Thrift.Test in 'gen-delphi\Thrift.Test.pas',
|
| 28 | Thrift in '..\..\..\lib\delphi\src\Thrift.pas',
|
| 29 | Thrift.Transport in '..\..\..\lib\delphi\src\Thrift.Transport.pas',
|
| 30 | Thrift.Protocol in '..\..\..\lib\delphi\src\Thrift.Protocol.pas',
|
| 31 | Thrift.Collections in '..\..\..\lib\delphi\src\Thrift.Collections.pas',
|
| 32 | Thrift.Server in '..\..\..\lib\delphi\src\Thrift.Server.pas',
|
| 33 | Thrift.Console in '..\..\..\lib\delphi\src\Thrift.Console.pas',
|
| 34 | Thrift.Utils in '..\..\..\lib\delphi\src\Thrift.Utils.pas',
|
| 35 | Thrift.Stream in '..\..\..\lib\delphi\src\Thrift.Stream.pas';
|
| 36 |
|
| 37 | var
|
| 38 | nParamCount : Integer;
|
| 39 | args : array of string;
|
| 40 | i : Integer;
|
| 41 | arg : string;
|
| 42 | s : string;
|
| 43 |
|
| 44 | begin
|
| 45 | try
|
| 46 | nParamCount := ParamCount;
|
| 47 | SetLength( args, nParamCount);
|
| 48 | for i := 1 to nParamCount do
|
| 49 | begin
|
| 50 | arg := ParamStr( i );
|
| 51 | args[i-1] := arg;
|
| 52 | end;
|
| 53 | TTestServer.Execute( args );
|
| 54 | Readln;
|
| 55 | except
|
| 56 | on E: Exception do
|
| 57 | Writeln(E.ClassName, ': ', E.Message);
|
| 58 | end;
|
| 59 | end.
|
| 60 |
|
| 61 |
|
| 62 |
|