コード例 #1
0
 private CommandResult StopSimpleProducer(string[] arg)
 {
     if (_simpleProducer == null)
     {
         _output.WriteLine("Cannot stop Simple producer as it is not started.");
         return(CommandResult.NonCriticalError);
     }
     _simpleProducer.Stop();
     _simpleProducer = null;
     return(CommandResult.Success);
 }
コード例 #2
0
 private CommandResult StartSimpleProducer(string[] arg)
 {
     if (_simpleProducer != null)
     {
         _output.WriteLine("Simple producer already started, stop it before trying to start it again.");
         return(CommandResult.NonCriticalError);
     }
     _simpleProducer = new SimpleProducer(_output, _error, _service);
     _simpleProducer.Start();
     return(CommandResult.Success);
 }