Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IDataCollectionAwareTestAdapter Interface

 

Provides an interface that adds the ability to raise events for diagnostic data adapters to custom test adapters.

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

public interface class IDataCollectionAwareTestAdapter

NameDescription
System_CAPS_pubpropertyDataCollectors

Gets or sets a DataCollectorNotifications object that can raise events for diagnostic data adapters.

Legacy Code Example

To implement this interface, you first add it to the class declaration for your derived test adapter.

public class MyTestAdapter : ITestAdapter, IDataCollectionAwareTestAdapter

Then in your test adapter code, you create a DataCollectors property that returns a DataCollectorNotifications object.

public DataCollectorNotifications DataCollectors { get; set; }

You can then use this object to raise events for diagnostic data adapters.

DataCollectors.RaiseCustomEvent(
    new MyCustomDataEventArgs(), 
    NotificationBroadCastLevel.All);
Return to top
Show: