From 53e656200368a983e563550e2cc1acbc6d86b729 Mon Sep 17 00:00:00 2001
From: chr <chrry550@outlook.com>
Date: 星期三, 08 四月 2026 19:57:14 +0800
Subject: [PATCH] 完善代码
---
OpenTap/Engine/TestStep.cs | 20 ++++++++++++++++++--
1 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/OpenTap/Engine/TestStep.cs b/OpenTap/Engine/TestStep.cs
index b5edd3e..ce5bde0 100644
--- a/OpenTap/Engine/TestStep.cs
+++ b/OpenTap/Engine/TestStep.cs
@@ -16,6 +16,7 @@
using System.Threading;
using System.Runtime.CompilerServices;
using System.Runtime.ExceptionServices;
+using OpenTap.Addin.Annotation;
namespace OpenTap
@@ -34,9 +35,22 @@
{
#region Properties
- private TestPlan root;
+ protected TestPlan root;
[XmlIgnore]
- public TestPlan Root { get => root; set => root = value; }
+ public TestPlan Root
+ {
+ get => root;
+ set
+ {
+ root = value;
+ OnRootChanged(value);
+ }
+ }
+
+ protected virtual void OnRootChanged(TestPlan plan)
+ {
+
+ }
public StepResult Result { get; set; }
@@ -97,6 +111,7 @@
"replaced with it's current value in some views.", Group: "Common", Order: 20001, Collapsed: true)]
[Unsweepable]
[MetaData(Frozen = true)]
+ [IgnoreVariable]
public string Name
{
get => name;
@@ -206,6 +221,7 @@
private string description;
[Display("描述")]
+ [IgnoreVariable]
public string Description
{
get => description;
--
Gitblit v1.9.1