public override void Operation() { if (component != null) { component.Operation(); } }
public override void Operation() { Component.Operation(); if (addedState == 0) { //new logic } Console.WriteLine("ConcreteDecoratorA operation"); }
// The client code works with all objects using the Component interface. // This way it can stay independent of the concrete classes of // components it works with. public void ClientCode(Component component) { Console.WriteLine("RESULT: " + component.Operation()); }
public override void Operation() { Component.Operation(); AddedBehaviour(); }
public virtual void Operation() { _component.Operation(); }