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.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.Data.DataObjectChangeEvents

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

Syntax

'Declaration
<GuidAttribute("5619B0F3-93CD-4af1-8FFC-458B86B45778")> _
Public MustInherit Class DataObjectChangeEvents
[GuidAttribute("5619B0F3-93CD-4af1-8FFC-458B86B45778")]
public abstract class DataObjectChangeEvents
[GuidAttribute(L"5619B0F3-93CD-4af1-8FFC-458B86B45778")]
public ref class DataObjectChangeEvents abstract
[<AbstractClass>]
[<GuidAttribute("5619B0F3-93CD-4af1-8FFC-458B86B45778")>]
type DataObjectChangeEvents =  class end
public abstract class DataObjectChangeEvents

The DataObjectChangeEvents type exposes the following members.

Constructors

  Name Description
Protected method DataObjectChangeEvents Class constructor. Instantiates a new instance of the DataObjectChangeEvents class.

Top

Methods

  Name Description
Public method EndEventGroup Terminates an event group that was initiated by calling the StartEventGroup method.
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Protected method OnEventGroupEnded Handler for the EventGroupEnded event.
Protected method OnEventGroupStarted Handler for the EventGroupStarted event.
Protected method OnObjectAdded Handler for the ObjectAdded event.
Protected method OnObjectChanged Handler for the ObjectChanged event.
Protected method OnObjectRemoved Handler for the ObjectRemoved event.
Public method RaiseObjectAdded(String, array<Object[]) Raises a standalone ObjectAdded event, specifying the object type and identifier.
Public method RaiseObjectAdded(Int32, String, array<Object[]) Raises the ObjectAdded event within a specific event group.
Public method RaiseObjectChanged(String, array<Object[]) Raises a standalone ObjectChanged event, specifying the type name and identifier.
Public method RaiseObjectChanged(Int32, String, array<Object[]) Raises the ObjectChanged event within a specified event group.
Public method RaiseObjectChanged(String, array<Object[], array<Object[]) Raises a standalone ObjectChanged event for an object whose identifier was modified during the change.
Public method RaiseObjectChanged(Int32, String, array<Object[], array<Object[]) Raises an ObjectChanged event within a specific event group for an object whose identifier was modified during the change.
Public method RaiseObjectRemoved(String, array<Object[]) Raises a standalone ObjectRemoved event, specifying type name and object identifier.
Public method RaiseObjectRemoved(Int32, String, array<Object[]) Raises the ObjectRemoved event within a specified event group.
Public method RollbackEventGroup Ends an event group by removing the queued event set from the group.
Public method StartEventGroup Starts a group of events initiated by a call to the StartEventGroup method.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Events

  Name Description
Public event EventGroupEnded Event raised when an event group has completed.
Public event EventGroupStarted Event raised when an event group has started.
Public event ObjectAdded Event raised when a data object has been added.
Public event ObjectChanged Event raised when a data object has been changed.
Public event ObjectRemoved Event raised when a data object has been removed.

Top

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 RaiseObjectAdded,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.

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

Microsoft.VisualStudio.Data Namespace

DataObjectChangedEventHandler

DataObjectChangedEventArgs