Provides the ability to implement commands, specifically custom commands, for nodes in a data view.
Assembly: Microsoft.VisualStudio.Data (in Microsoft.VisualStudio.Data.dll)
Thetype exposes the following members.
|Equals||Determines whether the specified Object is equal to the current Object. (Inherited from Object.)|
|ExecuteCommand(Int32, OleCommand, OleCommandExecutionOption, Object)||Causes the specified command to execute.|
|ExecuteCommand(Int32, OleCommand, OleCommandExecutionOption, Object)||Causes the specified command to execute on multiple items.|
|Finalize||Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)|
|GetCommandStatus||Retrieves the status of the commands executing on the specified items.|
|GetHashCode||Serves as a hash function for a particular type. (Inherited from Object.)|
|GetType||Gets the Type of the current instance. (Inherited from Object.)|
|MemberwiseClone||Creates a shallow copy of the current Object. (Inherited from Object.)|
|OnSiteChanged||Raises the SiteChanged event. (Inherited from ObjectWithSite.)|
|ToString||Returns a string that represents the current object. (Inherited from Object.)|
|IObjectWithSite.GetSite||Retrieves the last site set using the IObjectWithSite.SetSite method. In cases where there is no known site, the object returns an exception. (Inherited from ObjectWithSite.)|
|IObjectWithSite.SetSite||Provides the site's pointer to the site object. (Inherited from ObjectWithSite.)|
Implement this object in cases where a data provider has custom commands, or wishes to implement their own version of common commands. Without this class a data provider can only reference native command handler implementations.
When a data provider executes a command, it may want to trigger updates in the data view—for example, by adding, renaming, moving, refreshing, or deleting various object nodes. In order to notify the data view of such changes, a data provider should use methods on the DataViewHierarchyAccessor class provided as a property on this class.
Classes derived from this one should implement the GetCommandStatus method by using the protected DataViewHierarchyAccessor class to contextualize the specified itemIds, and then implement the ExecuteCommand method to actually execute the commands that were indicated as supported.