图1 Decorator模式结构图
图中的抽象类Decorator继承且包含Component,拥有基本功能,后面具体实例化的类(如:ConcreteDecoratorA)就可以扩展Component功能,开始“装饰”了。.NET中例子