Created
October 5, 2020 09:13
-
-
Save carmeleve/6c4fda14a68ce5a65650c4d4994225b8 to your computer and use it in GitHub Desktop.
This file contains 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
public static void DecoratorExample() | |
{ | |
var gigantosaurus = new Gigantosaurus(); | |
Console.WriteLine(gigantosaurus.Roar()); | |
var loudGigantosaurus = new LoudGigantosarusDecorator(gigantosaurus); | |
var extraLoudGigantosaurus = new ExtraLoudGigantosaurusDecorator(loudGigantosaurus); | |
Console.WriteLine(extraLoudGigantosaurus.Roar()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment