Componentes.Terceros.RemObj.../internal/5.0.23.613/1/RemObjects SDK for Delphi/Samples/Async/AsyncService_Impl.pas
david 2824855ea7 - Modificación del paquete RemObjects_Core_D10 para que sea un paquete de runtime/designtime (antes era designtime sólo)
- Recompilación en Delphi10 de todos los paquetes de RO para generar las DCU's en Lib\D10
- Recompilación en Delphi10 de todos los paquetes de DA para generar las DCU's en Lib\D10

git-svn-id: https://192.168.0.254/svn/Componentes.Terceros.RemObjects@9 b6239004-a887-0f4b-9937-50029ccdca16
2007-09-10 14:06:19 +00:00

51 lines
1.4 KiB
ObjectPascal

unit AsyncService_Impl;
{----------------------------------------------------------------------------}
{ This unit was automatically generated by the RemObjects SDK after reading }
{ the RODL file associated with this project . }
{ }
{ This is where you are supposed to code the implementation of your objects. }
{----------------------------------------------------------------------------}
interface
uses
{vcl:} Classes, SysUtils,
{RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
{Generated:} AsyncLibrary_Intf;
type
{ TAsyncService }
TAsyncService = class(TRORemotable, IAsyncService)
private
protected
{ IAsyncService methods }
function Sum(const A: Integer; const B: Integer): Integer;
end;
implementation
uses
{Generated:} AsyncLibrary_Invk;
procedure Create_AsyncService(out anInstance: IUnknown);
begin
anInstance := TAsyncService.Create;
end;
{ AsyncService }
function TAsyncService.Sum(const A: Integer; const B: Integer): Integer;
begin
Result := A + B;
Sleep(10000); { Simulate that calculations actually took 10 seconds. }
end;
initialization
TROClassFactory.Create('AsyncService', Create_AsyncService, TAsyncService_Invoker);
finalization
end.