Share via


ITestAttachment Interface

Encapsulates a stream of bytes that is stored on the test management server.

Namespace:  Microsoft.TeamFoundation.TestManagement.Client
Assembly:  Microsoft.TeamFoundation.TestManagement.Client (in Microsoft.TeamFoundation.TestManagement.Client.dll)

Syntax

'Declaration
Public Interface ITestAttachment _
    Inherits INotifyPropertyChanged
public interface ITestAttachment : INotifyPropertyChanged
public interface class ITestAttachment : INotifyPropertyChanged
type ITestAttachment =  
    interface
        interface INotifyPropertyChanged
    end
public interface ITestAttachment extends INotifyPropertyChanged

The ITestAttachment type exposes the following members.

Properties

  Name Description
Public property ArtifactUri Gets a uniform resource identifier (URI) that is used by the framework as a unique identifier for this attachment, or to create links to this attachment.
Public property AttachmentType Gets or sets the type of the attachment.
Public property Comment Gets or sets a comment about the attachment.
Public property IsComplete Gets a value that indicates whether the attachment is still being uploaded.
Public property Length Gets the length of the attachment, in bytes.
Public property Name Gets or sets the name of the attachment.
Public property Uri Gets the URI to retrieve the contents of the attachment.

Top

Methods

  Name Description
Public method AssociateWorkItem Associates the provided work item with this test result attachment.
Public method DisassociateWorkItem Removes an existing association between the provided work item and this attachment.
Public method DownloadToArray Downloads the attachment contents to the provided byte array after the associated work item has been saved to the server.
Public method DownloadToFile Downloads the attachment contents to the named file after the associated work item has been saved to the server.

Top

Events

  Name Description
Public event PropertyChanged Occurs when a property value changes. (Inherited from INotifyPropertyChanged.)

Top

Remarks

The content is uploaded to the server when the object that owns the attachment is saved. The content is downloaded from the server by using either the DownloadToArray or DownloadToFile methods.

This interface cannot be derived from.

See Also

Reference

Microsoft.TeamFoundation.TestManagement.Client Namespace

DownloadToArray

DownloadToFile