- Recompilación de todos los paquetes de RO para poner RemObjects_Core_D10 como paquete de runtime/designtime. git-svn-id: https://192.168.0.254/svn/Componentes.Terceros.RemObjects@5 b6239004-a887-0f4b-9937-50029ccdca16
51 lines
1.4 KiB
ObjectPascal
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.
|
|
|