- 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
92 lines
2.7 KiB
ObjectPascal
92 lines
2.7 KiB
ObjectPascal
unit AsyncLibrary_Async;
|
|
|
|
{----------------------------------------------------------------------------}
|
|
{ This unit was automatically generated by the RemObjects SDK after reading }
|
|
{ the RODL file associated with this project . }
|
|
{ }
|
|
{ Do not modify this unit manually, or your changes will be lost when this }
|
|
{ unit is regenerated the next time you compile the project. }
|
|
{----------------------------------------------------------------------------}
|
|
|
|
interface
|
|
|
|
uses
|
|
{vcl:} Classes, TypInfo,
|
|
{RemObjects:} uROClasses, uROTypes, uROClientIntf, uROAsync,
|
|
{Project:} AsyncLibrary_Intf;
|
|
|
|
type
|
|
IAsyncService_Async = interface;
|
|
CoAsyncService_Async = class;
|
|
TAsyncService_AsyncProxy = class;
|
|
{ IAsyncService_Async }
|
|
IAsyncService_Async = interface(IROAsyncInterface)
|
|
['{C9A9233F-C987-4EA6-A9AC-21B98FC33212}']
|
|
procedure Invoke_Sum(const A: Integer; const B: Integer);
|
|
function Retrieve_Sum: Integer;
|
|
end;
|
|
|
|
{ CoAsyncService_Async }
|
|
CoAsyncService_Async = class
|
|
class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IAsyncService_Async;
|
|
end;
|
|
|
|
{ TAsyncService_AsyncProxy }
|
|
TAsyncService_AsyncProxy = class(TROAsyncProxy, IAsyncService_Async)
|
|
private
|
|
protected
|
|
function __GetInterfaceName:string; override;
|
|
|
|
procedure Invoke_Sum(const A: Integer; const B: Integer);
|
|
function Retrieve_Sum: Integer;
|
|
end;
|
|
|
|
implementation
|
|
|
|
uses
|
|
{vcl:} SysUtils;
|
|
|
|
{ CoAsyncService }
|
|
|
|
class function CoAsyncService_Async.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IAsyncService_Async;
|
|
begin
|
|
result := TAsyncService_AsyncProxy.Create(aMessage, aTransportChannel);
|
|
end;
|
|
|
|
{ TAsyncService_AsyncProxy }
|
|
|
|
function TAsyncService_AsyncProxy.__GetInterfaceName:string;
|
|
begin
|
|
result := 'AsyncService';
|
|
end;
|
|
|
|
procedure TAsyncService_AsyncProxy.Invoke_Sum(const A: Integer; const B: Integer);
|
|
var __request:TStream;
|
|
begin
|
|
__AssertProxyNotBusy('Sum');
|
|
__request := TMemoryStream.Create;
|
|
|
|
__Message.InitializeRequestMessage(__TransportChannel, 'AsyncLibrary', __InterfaceName, 'Sum');
|
|
__Message.Write('A', TypeInfo(Integer), A, []);
|
|
__Message.Write('B', TypeInfo(Integer), B, []);
|
|
__Message.Finalize;
|
|
|
|
__Message.WriteToStream(__request);
|
|
__DispatchAsyncRequest('Sum',__request);
|
|
end;
|
|
|
|
function TAsyncService_AsyncProxy.Retrieve_Sum: Integer;
|
|
var __response:TStream;
|
|
begin
|
|
__response := __RetrieveAsyncResponse('Sum');
|
|
__Message.ReadFromStream(__response);
|
|
|
|
__Message.Read('Result', TypeInfo(Integer), Result, []);
|
|
|
|
__response.Free();
|
|
end;
|
|
|
|
|
|
initialization
|
|
end.
|