Bridge Pattern Code Review

Define the Portal Object

Code Review

Code Walkthrough

The PrinterPortal class (object) represents the abstraction component.

class PrinterPortal { private PrinterBridge.IPrinter printer;
public PrinterPortal(PrinterBridge.IPrinter bridge) { printer = bridge; }
public string printOperation() { return printer.printTestPage(); } }

The dependent Bridge class is "injected" into the class constructor.