Skip to content

Instantly share code, notes, and snippets.

@viniciussanchez
Last active April 9, 2021 03:05
Show Gist options
  • Save viniciussanchez/3cd712e21a676b9f3bc984d88b692c8e to your computer and use it in GitHub Desktop.
Save viniciussanchez/3cd712e21a676b9f3bc984d88b692c8e to your computer and use it in GitHub Desktop.
Refatoração do SRP (SOLID)
unit Solid.SRP.Logger;
interface
type
TLogger = class
public
procedure Log;
end;
implementation
uses Solid.SRP.MailService;
procedure TLogger.Log;
var
LMailService: TMailService;
begin
LMailService := TMailService.Create;
try
// write log
LMailService.SendMail;
finally
LMailService.Free;
end;
end;
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment