The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
IAttachmentOwner::CreateAttachment Method (String^, SourceFileAction)
Creates an attachment from a file, optionally deleting the source file after uploading.
Assembly: Microsoft.TeamFoundation.TestManagement.Client (in Microsoft.TeamFoundation.TestManagement.Client.dll)
ITestAttachment^ CreateAttachment( String^ sourceFileName, SourceFileAction deleteOnCompletion )
Parameters
- sourceFileName
-
Type:
System::String^
The fully qualified file name for the file to attach.
- deleteOnCompletion
-
Type:
Microsoft.TeamFoundation.TestManagement.Client::SourceFileAction
A member of the SourceFileAction enumeration that indicates whether the source file should be deleted after it is uploaded.
Return Value
Type: Microsoft.TeamFoundation.TestManagement.Client::ITestAttachment^The new attachment.
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 Add method.
Show: