示例#1
0
 public BellyRubProxy(string token, BellyEngine engine, Browser browser)
 {
     _token   = token;
     _engine  = engine;
     _browser = browser;
     _engine
     .On("engine-pause", m => _client.PauseEngine())
     .On("engine-resume", m => _client.ResumeEngine())
     .On("build-test-all", m => _client.RunAll())
     .On("abort-run", m => _client.AbortRun())
     .On("detect-recursion-on-next-run", m => _client.RunRecursiveRunDetection())
     .On("goto", msg => _client.GoTo(msg.file.ToString(), (int)msg.line, (int)msg.column))
     .On("focus-editor", msg => _client.FocusEditor())
     .RespondTo("get-token-path", (msg, respondWith) =>
                respondWith(new { token = _token })
                );
     _handlers = new Handler[] {
         new StatusEventHandler(),
         new ShutdownEventHandler(),
         new FocusEventHandler(_browser),
         new RunEventHandler(),
         new RunItemEventHandler(),
         new InformationEventsHandler()
     };
     foreach (var handler in _handlers)
     {
         handler.DispatchThrough((msg, o) => _engine.Send(msg, o));
     }
 }
 public void Exec(vsCommandExecOption ExecuteOption, ref object VariantIn, ref object VariantOut, ref bool Handled)
 {
     Logger.Write("Building all projects and running all tests");
     if (_client.IsRunning)
     {
         _client.RunAll();
     }
     else
     {
         manualRunAll();
     }
 }
示例#3
0
 public void IncomingMessage(object message)
 {
     _syncContext.Post(x =>
     {
         if (x.GetType() == typeof(ProfilerLoadErrorOccurredMessage))
         {
             var rerun = MessageBox.Show(
                 "Sorry but we need to rerun a full build. Would you like it to be done now?\nIf not you can always manually run from the continous tests menu.",
                 "Continuous Tests: Rerun All?", MessageBoxButtons.YesNo);
             if (rerun == DialogResult.Yes)
             {
                 _client.RunAll();
             }
         }
     }, message);
 }
示例#4
0
 public void RunAll()
 {
     _client.RunAll();
 }