Exemplo n.º 1
0
 public virtual void Update(NumberGenerator generator)
 {
     Console.WriteLine($"DigitObserver:{generator.GetNumber()}");
     try
     {
         Thread.Sleep(100);
     }
     catch (System.Exception)
     {
         throw;
     }
 }
Exemplo n.º 2
0
        public virtual void Update(NumberGenerator generator)
        {
            Console.Write("GraphOvserver:");
            int count = generator.GetNumber();

            for (int i = 0; i < count; i++)
            {
                Console.Write("*");
            }
            Console.WriteLine();
            try
            {
                Thread.Sleep(100);
            }
            catch (System.Exception)
            {
                throw;
            }
        }
        public void Update(NumberGenerator generator)
        {
            var padCount = generator.GetNumber();

            Console.WriteLine(_str.PadLeft(padCount, ' '));
        }