Compartir a través de


DataObjectChangeEvents Class

Provides a set of events which a DDEX provider can raise when changes to data objects are made, and provides the means by which a provider can connect to them.

Namespace:  Microsoft.VisualStudio.Data
Assembly:  Microsoft.VisualStudio.Data (in Microsoft.VisualStudio.Data.dll)

Syntax

<GuidAttribute("5619B0F3-93CD-4af1-8FFC-458B86B45778")> _
Public MustInherit Class DataObjectChangeEvents

Dim instance As DataObjectChangeEvents
[GuidAttribute("5619B0F3-93CD-4af1-8FFC-458B86B45778")]
public abstract class DataObjectChangeEvents
[GuidAttribute(L"5619B0F3-93CD-4af1-8FFC-458B86B45778")]
public ref class DataObjectChangeEvents abstract
public abstract class DataObjectChangeEvents

Remarks

In addition to singular events, this class allows you to structure event groups.

Under some circumstances, multiple change events need to be grouped together and be treated as an atomic transaction.

Normally, an event listener reacts to event-group notifications by assembling a queue of events raised inside an event group; then, only after notification that the event group has ended, are the events processed in a transactional manner (that is, all events apply, or none of the events apply).

On the notification side, event grouping is implemented by enabling the specification of a hierarchy of event groups, each of them identified with a group ID. A notifier begins by calling StartEventGroup, which returns an ID for the group. Then the notifier calls the [M:Microsoft.VisualStudio.Data.DataObjectChangeEvents.RaiseObjectAdded(System.String,System.Object[]],RaiseObjectChanged, and RaiseObjectRemoved methods, passing in the group ID. (Optionally, a notifier can start an embedded event group by calling StartEventGroup again, with the current group ID.)

Finally the notifier calls EndEventGroup using the group ID. Once the top-most group (the group created by calling StartEventGroup with a parameter of zero) has ended, all the events raised for that group are dispatched to listeners in a single event group.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.Data.DataObjectChangeEvents

Thread Safety

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

See Also

Reference

DataObjectChangeEvents Members

Microsoft.VisualStudio.Data Namespace

DataObjectChangedEventHandler

DataObjectChangedEventArgs