public static void Main()
        {
            new_Console = new Background_Color(new New_Console());
            new_Console = new Text_Color(new_Console);
            new_Console.WriteLine("Decorator Pattern\n");

            IComponent component = new Component();

            Display("1. Basic component: ", component);
            Display("2. A-decorated : ", new DecoratorA(component));
            Display("3. B-decorated : ", new DecoratorB(component));
            Display("4. B-A-decorated : ", new DecoratorB(
                        new DecoratorA(component)));
            // Explicit DecoratorB
            DecoratorB b = new DecoratorB(new Component());

            Display("5. A-B-decorated : ", new DecoratorA(b));
            // Invoking its added state and added behavior
            new_Console.WriteLine("\t\t\t" + b.add_state + b.Added_Behavior());
            Console.ReadKey();
        }
 public override void WriteLine(string value)
 {
     Console.ForegroundColor = ConsoleColor.Blue;
     decorate_console.WriteLine(value);
 }
 static void Display(string s, IComponent c)
 {
     new_Console.WriteLine(s + c.Operation());
 }
 public override void WriteLine(string value)
 {
     Console.BackgroundColor = ConsoleColor.Red;
     decorate_console.WriteLine(value);
 }