static void Main() { Abstraction ab = new RefinedAbstraction(); ab.SetImplementor(new ConcreteImplementorA()); ab.Operation(); ab.SetImplementor(new ConcreteImplementorB()); ab.Operation(); Console.ReadKey(); }
static void Main(string[] args) { Abstraction ab = new RefinedAbstraction(); ab.SetImplementor(new ConcreteImplementorA()); ab.Operation(); ab.SetImplementor(new ConcreteImplementorB()); ab.Operation(); }
public static void BridgePattern() { Abstraction ab = new RefinedAbstraction(); ab.SetImplementor(new ConcreteImplementorA()); ab.Operation(); ab.SetImplementor(new ConcreteImplementorB()); ab.Operation(); Console.Read(); }
/// <summary> /// Entry point into console application. /// </summary> /// <param name="args"></param> static void Main(string[] args) { Abstraction ab = new RefinedAbstraction(); // Set implementation and call ab.SetImplementor(new ConcreteImplementorA()); ab.Operation(); // Change implemention and call ab.SetImplementor(new ConcreteImplementorB()); ab.Operation(); // Wait for user Console.ReadKey(); }