Adapter:?
- The Adapter class implements the ITarget interface, and it wraps an
instance of the Adaptee class. It delegates calls from Request() to the
SpecificRequest() method of the Adaptee, making the two interfaces
compatible.
public class Adapter : ITarget
private readonly Adaptee _adaptee;
public Adapter(Adaptee adaptee) => _adaptee = adaptee;
public void Request() => _adaptee.SpecificRequest();