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);
 }
 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);
 }