Share via


ITestRunBase.CreateAttachment Method (Byte[], Int32, Int32)

 

Creates an attachment for a Test Result from a byte array.

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

Syntax

ITestAttachment CreateAttachment(
    byte[] contents,
    int offset,
    int length
)
ITestAttachment^ CreateAttachment(
    array<unsigned char>^ contents,
    int offset,
    int length
)
abstract CreateAttachment : 
        contents:byte[] *
        offset:int *
        length:int -> ITestAttachment
Function CreateAttachment (
    contents As Byte(),
    offset As Integer,
    length As Integer
) As ITestAttachment

Parameters

  • contents
    Type: System.Byte[]

    Byte array that contains attachment contents.

  • offset
    Type: System.Int32

    Index of the first byte that will be used as attachment content, usually 0.

  • length
    Type: System.Int32

    Number of bytes in the attachment.

Return Value

Type: Microsoft.TeamFoundation.TestManagement.Client.ITestAttachment

New attachment object.

Remarks

When the object owning this attachment is saved, the contents will be uploaded to the TCM server. The array should not be modified before then.

See Also

CreateAttachment Overload
ITestRunBase Interface
Microsoft.TeamFoundation.TestManagement.Client Namespace

Return to top