Partager via


DataCollectionSink.SendFileAsync, méthode (DataCollectionContext, String, Boolean)

Envoie un fichier 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 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
)

Paramètres

  • path
    Type : System.String
    Chemin d'accès local où le fichier existe.
  • deleteFile
    Type : System.Boolean
    true pour supprimer automatiquement le fichier après l'avoir envoyé ; sinon false.

Exceptions

Exception Condition
[FileNotFoundException]

path n'existe pas.

Sécurité .NET Framework

Voir aussi

Référence

DataCollectionSink Classe

SendFileAsync, surcharge

Microsoft.VisualStudio.TestTools.Execution, espace de noms

IBaseRunContext

DataCollectionContext

RequestId