Last active
April 9, 2021 03:05
-
-
Save viniciussanchez/3cd712e21a676b9f3bc984d88b692c8e to your computer and use it in GitHub Desktop.
Refatoração do SRP (SOLID)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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