Share via


IAttachmentOwner.CreateAttachment Method (String)

Creates an attachment from a file.

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

Syntax

'Declaration
Function CreateAttachment ( _
    localFileName As String _
) As ITestAttachment
ITestAttachment CreateAttachment(
    string localFileName
)
ITestAttachment^ CreateAttachment(
    String^ localFileName
)
abstract CreateAttachment : 
        localFileName:string -> ITestAttachment
function CreateAttachment(
    localFileName : String
) : ITestAttachment

Parameters

  • localFileName
    Type: String

    The fully qualified path for the file to attach.

Return Value

Type: Microsoft.TeamFoundation.TestManagement.Client.ITestAttachment
The new attachment.

Remarks

When the object is added and saved, the specified file will be uploaded to the server or queued for upload. It must continue to be readable until the upload is completed. The attachment is added to the server by calling the [M:Microsoft.TeamFoundation.TestManagement.Client.IAttachmentCollection.Add('0)] method.

.NET Framework Security

See Also

Reference

IAttachmentOwner Interface

CreateAttachment Overload

Microsoft.TeamFoundation.TestManagement.Client Namespace

ITestAttachment

[M:Microsoft.TeamFoundation.TestManagement.Client.IAttachmentCollection.Add('0)]