Exemplo n.º 1
0
 public override void Execute()
 {
     try
     {
         subject.Execute();
     }
     catch (Exception exception)
     {
         NotifyErrorObservers(exception);
     }
 }
Exemplo n.º 2
0
 public override void Execute()
 {
     try
     {
         stopWatch = new Stopwatch();
         stopWatch.Start();
         subject.Execute();
     }
     catch (Exception exception)
     {
         NotifyErrorObservers(exception);
     }
 }
Exemplo n.º 3
0
 public override void Execute()
 {
     try
     {
         subject.Execute();
         NotifyObservers(passed);
         NotifyCompleteObservers();
     }
     catch (Exception exception)
     {
         NotifyErrorObservers(exception);
     }
 }
Exemplo n.º 4
0
 public override void Execute()
 {
     Scheduler.Schedule(() =>
     {
         try
         {
             subject.Execute();
         }
         catch (Exception exception)
         {
             NotifyErrorObservers(exception);
         }
     });
 }
Exemplo n.º 5
0
 public override void Execute()
 {
     Timer timer = new Timer(_ =>
     {
         try
         {
             subject.Execute();
         }
         catch (Exception exception)
         {
             NotifyErrorObservers(exception);
         }
     }, null, dueTime, new TimeSpan(-1));
 }
Exemplo n.º 6
0
 public override void Execute()
 {
     try
     {
         subject.Execute();
         double average = this.value / count;
         NotifyObservers(average);
         NotifyCompleteObservers();
     }
     catch (Exception exception)
     {
         NotifyErrorObservers(exception);
     }
 }
Exemplo n.º 7
0
        public override void Execute()
        {
            Task task = Task.Factory.StartNew(() =>
            {
                try
                {
                    subject.Execute();
                }
                catch (Exception exception)
                {
                    NotifyErrorObservers(exception);
                }
            });

            Task.WaitAll(task);
        }
Exemplo n.º 8
0
 public override void Execute()
 {
     try
     {
         threadExecuter =
             new ThreadExecuter <T>()
         {
             Value       = this.value,
             Source      = this.source,
             Accumulator = this.accumulator,
             Observers   = observers,
             Scheduler   = this.Scheduler
         };
         Scheduler.Schedule(threadExecuter.StartExecute);
         subject.Execute();
         WaitHandle.WaitAll(new WaitHandle[] { threadExecuter.autoResetEvent });
         NotifyObservers(threadExecuter.Value);
     }
     catch (Exception exception)
     {
         NotifyErrorObservers(exception);
     }
 }
Exemplo n.º 9
0
 public override void Execute()
 {
     first.Execute();
     second.Execute();
 }
Exemplo n.º 10
0
 public override void Execute()
 {
     subject.Execute();
 }