Share via


DataCollectionEvents.DataRequest Event

Raised to request intermediate data.

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

Syntax

'Declaration
Public MustOverride Event DataRequest As EventHandler(Of DataRequestEventArgs)
public abstract event EventHandler<DataRequestEventArgs> DataRequest
public:
virtual   event EventHandler<DataRequestEventArgs^>^ DataRequest {
    void add (EventHandler<DataRequestEventArgs^>^ value);
    void remove (EventHandler<DataRequestEventArgs^>^ value);
}
abstract DataRequest : IEvent<EventHandler<DataRequestEventArgs>,
    DataRequestEventArgs>
JScript does not support events.

Remarks

DataRequest events can be specific to a test case or specific to a session. When this event is raised in a test case context, intermediate data for the test case is requested. When this event is raised in a session context, intermediate data for a session is requested.

Use a method of the DataCollectionSink class that sends a Stream or a file and a userToken parameter to send intermediate data to a diagnostic data adapter.

.NET Framework Security

See Also

Reference

DataCollectionEvents Class

Microsoft.VisualStudio.TestTools.Execution Namespace

SendFileAsync

SendStreamAsync