Exemple #1
0
 public ComputerProxy(Computer computer)
 {
     _computer = computer;
        _realComputer = new RealComputer();
 }
Exemple #2
0
 public NewComputerProxy(Computer computer)
 {
     _computer = computer;
 }
Exemple #3
0
 public void Visit(Computer computer)
 {
     Total += computer.Price;
 }
Exemple #4
0
 private static void Visitors()
 {
     var comp1 = new Computer("Lenovo", "Intel i5", 2, 250, 2009, 750);
        var priceVisitor=new TotalPrice();
        comp1.Accept(priceVisitor);
        Console.ForegroundColor = ConsoleColor.DarkYellow;
        Console.WriteLine("The Price is "+ priceVisitor.Total);
 }
 public void Notify(Computer computer)
 {
     var ukInfo= CultureInfo.GetCultureInfo("en-GB");
        Console.WriteLine("Send Email: Computer Lenovo is available in stores.");
        Console.WriteLine("Its cost "+300.ToString("C", ukInfo));
 }