delphimvcframework/samples/services_injection/Services.ConnectionU.pas
2024-03-27 00:10:48 +01:00

41 lines
669 B
ObjectPascal

unit Services.ConnectionU;
interface
uses Services.InterfacesU;
type
TConnectionService = class(TInterfacedObject, IConnectionService)
protected
function GetConnectionName: string;
public
constructor Create; virtual;
destructor Destroy; override;
end;
implementation
uses
MVCFramework.Logger;
{ TConnectionService }
constructor TConnectionService.Create;
begin
inherited;
LogI('Service ' + ClassName + ' created');
end;
destructor TConnectionService.Destroy;
begin
LogI('Service ' + ClassName + ' destroyed');
inherited;
end;
function TConnectionService.GetConnectionName: string;
begin
Result := 'MyDemoConnection';
end;
end.