Compartilhar via


DataCollectionSink.SendFileAsync Method (DataCollectionContext, String, Boolean)

Sends a file asynchronously to the DataCollectionSink by using the parameters that are specified for this method.

Namespace:  Microsoft.VisualStudio.TestTools.Execution
Assembly:  Microsoft.VisualStudio.QualityTools.ExecutionCommon (in Microsoft.VisualStudio.QualityTools.ExecutionCommon.dll)

Syntax

'Declaration
Public Sub SendFileAsync ( _
    context As DataCollectionContext, _
    path As String, _
    deleteFile As Boolean _
)
public void SendFileAsync(
    DataCollectionContext context,
    string path,
    bool deleteFile
)
public:
void SendFileAsync(
    DataCollectionContext^ context, 
    String^ path, 
    bool deleteFile
)
member SendFileAsync : 
        context:DataCollectionContext * 
        path:string * 
        deleteFile:bool -> unit
public function SendFileAsync(
    context : DataCollectionContext, 
    path : String, 
    deleteFile : boolean
)

Parameters

  • path
    Type: String

    The local path where the file exists.

  • deleteFile
    Type: Boolean

    true to automatically delete the file after sending it; otherwise, false.

Exceptions

Exception Condition
FileNotFoundException

The path does not exist.

.NET Framework Security

See Also

Reference

DataCollectionSink Class

SendFileAsync Overload

Microsoft.VisualStudio.TestTools.Execution Namespace

IBaseRunContext

DataCollectionContext

RequestId