Пример #1
0
        private void OnGlobalToggled(object sender, InstantToggleEventArgs args)
        {
            if (args.View != View || sender == this)
            {
                return;
            }

            IsEnabled = !args.IsRunning;
        }
Пример #2
0
        private void OnToggled(InstantToggleEventArgs args)
        {
            isRunning = args.IsRunning;

            var handler = Toggled;

            if (handler != null)
            {
                handler(this, args);
            }
        }
Пример #3
0
        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();
            }
        }
Пример #4
0
		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();
			}
		}
Пример #5
0
        private void OnToggled(InstantToggleEventArgs args)
        {
            isRunning = args.IsRunning;

            var handler = Toggled;
            if (handler != null)
                handler (this, args);
        }
Пример #6
0
        private void OnGlobalToggled(object sender, InstantToggleEventArgs args)
        {
            if (args.View != View || sender == this)
                return;

            IsEnabled = !args.IsRunning;
        }