Compartilhar via


DataCollectionSink.SendStreamAsync Method (DataCollectionContext, Stream, String, Boolean)

Sends a stream 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 SendStreamAsync ( _
    context As DataCollectionContext, _
    stream As Stream, _
    fileName As String, _
    closeStream As Boolean _
)
public void SendStreamAsync(
    DataCollectionContext context,
    Stream stream,
    string fileName,
    bool closeStream
)
public:
void SendStreamAsync(
    DataCollectionContext^ context, 
    Stream^ stream, 
    String^ fileName, 
    bool closeStream
)
member SendStreamAsync : 
        context:DataCollectionContext * 
        stream:Stream * 
        fileName:string * 
        closeStream:bool -> unit
public function SendStreamAsync(
    context : DataCollectionContext, 
    stream : Stream, 
    fileName : String, 
    closeStream : boolean
)

Parameters

  • stream
    Type: Stream

    The Stream to send.

  • fileName
    Type: String

    The file name to use for the data on the client.

  • closeStream
    Type: Boolean

    true to automatically close the stream when sending is completed; otherwise, false.

Exceptions

Exception Condition
ArgumentException

The fileName is nulla null reference (Nothing in Visual Basic), is empty, is a reserved file name, or contains invalid characters.

InvalidOperationException

The stream cannot be read.

.NET Framework Security

See Also

Reference

DataCollectionSink Class

SendStreamAsync Overload

Microsoft.VisualStudio.TestTools.Execution Namespace

SendStreamAsync

DataCollectionContext