Created
May 4, 2021 11:38
-
-
Save viniciussanchez/2c079a67280383eca51962d90d0fddf2 to your computer and use it in GitHub Desktop.
Refatoração do princípio DIP do 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.DIP.Refatoracao; | |
interface | |
type | |
TFirebirdConnection = class | |
public | |
procedure Connect; | |
end; | |
IAves = interface | |
['{1F0490B4-0D6D-4BDE-A28A-8E1E2E717874}'] | |
procedure Salvar(const AConnection: TFirebirdConnection); | |
end; | |
TPinguim = class(TInterfacedObject, IAves) | |
private | |
procedure Salvar(const AConnection: TFirebirdConnection); | |
end; | |
implementation | |
{ TFirebirdConnection } | |
procedure TFirebirdConnection.Connect; | |
begin | |
end; | |
{ TPinguim } | |
procedure TPinguim.Salvar(const AConnection: TFirebirdConnection); | |
begin | |
end; | |
end. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment