コード例 #1
0
 private void BindAndStartRunning()
 {
     m_Simulator     = new CustomNodeManager();
     BindingFactory  = m_Simulator;
     EncodingFactory = m_Simulator;
     Start();
     m_Simulator.Run();
 }
コード例 #2
0
 private void Setup()
 {
     try
     {
         m_ViewModel.ProducerRestart  = new RestartCommand(Current.Restart);
         Current.ConfigurationFactory = new ProducerConfigurationFactory();
         CustomNodeManager _simulator = new CustomNodeManager();
         m_ToDispose.Add(_simulator);
         Current.BindingFactory        = _simulator;
         Current.EncodingFactory       = _simulator;
         Current.MessageHandlerFactory = new ProducerMessageHandlerFactory(x => m_ToDispose.Add(x), m_Trace, m_ViewModel);
         Current.Initialize();
         Current.Run();
         _simulator.Run();
         m_ViewModel.ProducerErrorMessage = "Running";
     }
     catch (Exception ex)
     {
         m_ViewModel.ProducerErrorMessage = String.Format("Error: {0}", ex.Message);
         Dispose();
     }
 }