delphimvcframework/samples/webcontextevents/ServicesU.pas

33 lines
483 B
ObjectPascal
Raw Normal View History

2021-12-30 00:45:19 +01:00
unit ServicesU;
interface
type
ICalculator = interface
['{251FB86D-1A8B-4BBA-9487-B52AF8E18536}']
function DoCalc(a,b: Integer): Integer;
end;
TMyService = class(TInterfacedObject, ICalculator)
public
function DoCalc(a,b: Integer): Integer;
destructor Destroy; override;
end;
2021-12-30 00:45:19 +01:00
implementation
{ TMyService }
destructor TMyService.Destroy;
begin
inherited;
end;
function TMyService.DoCalc(a, b: Integer): Integer;
begin
Result := a + b;
end;
2021-12-30 00:45:19 +01:00
end.