Partager via


DataCollectionSink.SendStreamAsync, méthode (DataCollectionContext, Stream, String, Boolean)

Envoie un flux de façon asynchrone au DataCollectionSink à l'aide des paramètres spécifiés pour cette méthode.

Espace de noms :  Microsoft.VisualStudio.TestTools.Execution
Assembly :  Microsoft.VisualStudio.QualityTools.ExecutionCommon (dans Microsoft.VisualStudio.QualityTools.ExecutionCommon.dll)

Syntaxe

'Déclaration
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
)

Paramètres

  • fileName
    Type : System.String
    Nom de fichier à utiliser pour les données sur le client.
  • closeStream
    Type : System.Boolean
    true pour fermer automatiquement le flux après l'envoi ; sinon, false.

Exceptions

Exception Condition
[ArgumentException]

Le fileName est nullune référence null (Nothing en Visual Basic) est vide, est un nom de fichier réservé ou contient des caractères non valides.

[InvalidOperationException]

Le stream ne peut pas être lu.

Sécurité .NET Framework

Voir aussi

Référence

DataCollectionSink Classe

SendStreamAsync, surcharge

Microsoft.VisualStudio.TestTools.Execution, espace de noms

SendStreamAsync

DataCollectionContext