public static void Ex1()
        {
            Decorator.Exemplo1.Component component = new Exemplo1.Component();
            component.Operation();

            Decorator.Exemplo1.Decorator decorator = new Exemplo1.Decorator(component);
            decorator.Operation();

            decorator = new Exemplo1.Decorator(decorator);
            decorator.Operation();
        }
示例#2
0
        public static void Ex1()
        {
            Decorator.Exemplo1.Component component = new Exemplo1.Component();
            component.Operation();

            Decorator.Exemplo1.Decorator decorator = new Exemplo1.Decorator(component);
            decorator.Operation();

            decorator = new Exemplo1.Decorator(decorator);
            decorator.Operation();
        }