Exemple #1
0
 public virtual void Update(NumberGenerator generator)
 {
     Console.WriteLine($"DigitObserver:{generator.GetNumber()}");
     try
     {
         Thread.Sleep(100);
     }
     catch (System.Exception)
     {
         throw;
     }
 }
        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, ' '));
        }