private void OnGlobalToggled(object sender, InstantToggleEventArgs args) { if (args.View != View || sender == this) { return; } IsEnabled = !args.IsRunning; }
private void OnToggled(InstantToggleEventArgs args) { isRunning = args.IsRunning; var handler = Toggled; if (handler != null) { handler(this, args); } }
private void OnInstantToggled(object sender, InstantToggleEventArgs args) { if (args.View != this.view) { return; } if (args.IsRunning) { this.context = new ExecutionContext { TestCode = args.TestCode, Span = args.MethodSpan }; Execute(this.view.TextSnapshot, GetCancelSource().Token); } else { this.context = null; this.layer.RemoveAllAdornments(); } }
private void OnInstantToggled (object sender, InstantToggleEventArgs args) { if (args.View != this.view) return; if (args.IsRunning) { this.context = new ExecutionContext { TestCode = args.TestCode, Span = args.MethodSpan }; Execute (this.view.TextSnapshot, GetCancelSource().Token); } else { this.context = null; this.layer.RemoveAllAdornments(); } }
private void OnToggled(InstantToggleEventArgs args) { isRunning = args.IsRunning; var handler = Toggled; if (handler != null) handler (this, args); }
private void OnGlobalToggled(object sender, InstantToggleEventArgs args) { if (args.View != View || sender == this) return; IsEnabled = !args.IsRunning; }