📄 waddemoserviceimpl.pas
字号:
{ Invokable implementation declaration unit for TWADDemoService,
which implements IWADDemoService }
unit WADDemoServiceImpl;
interface
uses
WADDemoServiceIntf, InvokeRegistry, XSBuiltIns, Sysutils;
type
TWADDemoService = class(TInterfacedObject, IWADDemoService)
// Make sure you have your invokable logic implemented in IWADDemoService
// first, then use CodeInsight(tm) to fill in this implementation
// section by pressing Ctrl+Space, marking all the interface
// declarations for IWADDemoService, and pressing Enter.
// Once the declarations are inserted here, use ClassCompletion(tm)
// to write the implementation stubs by pressing Ctrl+Shift+C
public
function BuyBooks(const sBookName, sMemberID : String;
const iCopies : Integer;
var iConfirmID : Integer; var cDate : TXSDate) : Boolean; stdcall;
end;
implementation
procedure WADDemoServiceFactory(out Obj: TObject);
begin
Obj := TWADDemoService.Create;
end;
{ TWADDemoService }
function TWADDemoService.BuyBooks(const sBookName, sMemberID: String;
const iCopies: Integer; var iConfirmID: Integer;
var cDate: TXSDate): Boolean;
begin
Randomize;
iConfirmID := Random(10000);
cDate.AsDate := Now;
Result := True;
end;
initialization
InvRegistry.RegisterInvokableClass(TWADDemoService, @WADDemoServiceFactory);
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -