DeploymentItem 类

表示要在测试运行中部署的文件、目录或其他项。

继承层次结构

System.Object
  Microsoft.VisualStudio.TestTools.Common.DeploymentItem

命名空间:  Microsoft.VisualStudio.TestTools.Common
程序集:  Microsoft.VisualStudio.QualityTools.Common(在 Microsoft.VisualStudio.QualityTools.Common.dll 中)

语法

声明
<SerializableAttribute> _
Public NotInheritable Class DeploymentItem _
    Implements IPersistable, IXmlTestStore
[SerializableAttribute]
public sealed class DeploymentItem : IPersistable, 
    IXmlTestStore
[SerializableAttribute]
public ref class DeploymentItem sealed : IPersistable, 
    IXmlTestStore
[<Sealed>]
[<SerializableAttribute>]
type DeploymentItem =  
    class
        interface IPersistable
        interface IXmlTestStore
    end
public final class DeploymentItem implements IPersistable, IXmlTestStore

DeploymentItem 类型公开以下成员。

构造函数

  名称 说明
公共方法 DeploymentItem(String) 使用提供的路径初始化 DeploymentItem 类的实例。
公共方法 DeploymentItem(String, String) 使用提供的路径和输出目录初始化 DeploymentItem 类的实例。

页首

属性

  名称 说明
公共属性 OutputDirectory 获取输出目录的相对路径。
公共属性 Path 获取部署项的路径。

页首

方法

  名称 说明
公共方法静态成员 CheckDeploymentItem 验证 path 和 outputDirectory 参数指示的位置是否存在。
公共方法 Equals 确定当前 DeploymentItem 实例是否等于指定的实例。 (重写 Object.Equals(Object)。)
受保护的方法 Finalize 允许对象在“垃圾回收”回收之前尝试释放资源并执行其他清理操作。 (继承自 Object。)
公共方法 GetHashCode 作为 DeploymentItem 对象实例的哈希函数。 (重写 Object.GetHashCode()。)
公共方法 GetType 获取当前实例的 Type。 (继承自 Object。)
公共方法 Load 使用提供的参数,从提供的 XML 元素中加载当前对象。
受保护的方法 MemberwiseClone 创建当前 Object 的浅表副本。 (继承自 Object。)
公共方法 PrepareToPersist 在此版本中不执行任何操作。
公共方法 RecoverFromPersistence 验证从 XML 储存区中检索的当前实例是否有效。
公共方法 Save 使用提供的参数,将当前对象保存到提供的 XML 元素中。
公共方法 ToString 返回 string 形式的属性值。 (重写 Object.ToString()。)

页首

线程安全

此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。

请参见

参考

Microsoft.VisualStudio.TestTools.Common 命名空间