Pluggable Adapter Pattern Code Review

Use the Pluggable Adapter Pattern

Code Review

Code Walkthrough

The Program class creates two instances of the Adapter class (object), passing a different pluggable adapter to each Adapter instance.

class Program { static void Main(string[] args) { Adapter adapter1 = new Adapter(new Adaptee()); Console.WriteLine(adapter1.Request(5));
Adapter adapter2 = new Adapter(new Target()); Console.WriteLine(adapter2.Request(5));
Console.Read(); } }