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.

DataCollectorNotifications Class

 

Used by custom test adapters to raise events for diagnostic data adapters.

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

System.Object
  Microsoft.VisualStudio.TestTools.Execution.DataCollectorNotifications

public abstract class DataCollectorNotifications

NameDescription
System_CAPS_protmethodDataCollectorNotifications()

Initializes a new instance of the DataCollectorNotifications class.

NameDescription
System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodRaiseCustomEvent(CustomNotificationEventArgs)

Raises a custom event by using the provided event arguments.

System_CAPS_pubmethodRaiseCustomEvent(CustomNotificationEventArgs, NotificationBroadcastLevel)

Raises a custom event by using the provided event arguments and indication of broadcast level.

System_CAPS_pubmethodRaiseCustomEventAsync(CustomNotificationEventArgs)

Asynchronously raises a custom event by using the provided event arguments.

System_CAPS_pubmethodRaiseCustomEventAsync(CustomNotificationEventArgs, NotificationBroadcastLevel)

Asynchronously raises a custom event by using the provided event arguments and indication of broadcast level.

System_CAPS_pubmethodRaiseCustomEventAsync(CustomNotificationEventArgs, NotificationBroadcastLevel, Object)

Asynchronously raises a custom event by using the provided event arguments, indication of broadcast level, and user token.

System_CAPS_pubmethodRaiseTestFailedEvent(ITestElement, TestCaseFailureType)

Raises a TestCaseFailed event to notify diagnostic data adapters that the test case has failed.

System_CAPS_pubmethodToString()

(Inherited from Object.)

NameDescription
System_CAPS_pubeventCustomEventCompleted

Raised by the testing framework when a diagnostic data adapter has finished handling an asynchronous event.

Legacy Code Example

To use a DataCollectorNotifications object in a custom test adapter class, you first add the IDataCollectionAwareTestAdapter 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);

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: