Partager via


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

Paramètres

  • fileName
    Type : System.String
    Nom de fichier à utiliser pour les données sur le client.Ne doit pas être nullune référence null (Nothing en Visual Basic) ou vide et ne peut pas contenir de caractères non conformes.N'incluez pas de chemin d'accès complet.
  • description
    Type : System.String
    Brève description du fichier.
  • 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

DataCollectionContext