Inheritance: System.EventArgs
示例#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;
        }