Exemplo n.º 1
0
 public NodeReporter(NodeManager nodeManager)
 {
     _nodeManager = nodeManager;
     _debugDisposable = Disposable.Empty;
     _warnDisposable = Disposable.Empty;
     _errorDisposable = Disposable.Empty;
 }
Exemplo n.º 2
0
 static void Main(string[] args)
 {
     var nodes = Enumerable.Range(0, 10)
                           .Select(i =>
                           {
                               var n = new WorkerNode();
                               n.StartWork();
                               return n;
                           }).ToList();
     var nodeManager = new NodeManager(nodes);
        // nodeManager.NodesRunning.Subscribe(i => Console.Out.WriteLine(i));
     var nodeReporter = new NodeReporter(nodeManager);
     nodeReporter.SetReportingLevel(NodeReporter.ReportingLevel.All);
     Console.ReadKey();
     nodes[0].Stop();
     nodes[1].Stop();
     nodes[2].Stop();
     Console.ReadKey();
     nodes[3].Stop();
     nodes[4].Stop();
     nodes[5].Stop();
     Console.ReadKey();
     nodes[0].StartWork();
     nodes[1].StartWork();
     nodes[2].StartWork();
     Console.ReadKey();
     nodes[3].StartWork();
     nodes[4].StartWork();
     nodes[5].StartWork();
     Console.ReadKey();
 }