Compartilhar via


CommandSetLibrary Class

Base class for CommandSet and ClipboardCommandSet. Provides access to current selection, diagram, windows and services.

This API is not CLS-compliant. 

Inheritance Hierarchy

System.Object
  System.MarshalByRefObject
    Microsoft.VisualStudio.Modeling.Shell.CommandSetLibrary
      Microsoft.VisualStudio.Modeling.Shell.ClipboardCommandSet
      Microsoft.VisualStudio.Modeling.Shell.CommandSet

Namespace:  Microsoft.VisualStudio.Modeling.Shell
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.Shell.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.Shell.10.0.dll)

Syntax

'Declaração
<CLSCompliantAttribute(False)> _
Public MustInherit Class CommandSetLibrary _
    Inherits MarshalByRefObject
[CLSCompliantAttribute(false)]
public abstract class CommandSetLibrary : MarshalByRefObject
[CLSCompliantAttribute(false)]
public ref class CommandSetLibrary abstract : public MarshalByRefObject
[<AbstractClass>]
[<CLSCompliantAttribute(false)>]
type CommandSetLibrary =  
    class
        inherit MarshalByRefObject
    end
public abstract class CommandSetLibrary extends MarshalByRefObject

The CommandSetLibrary type exposes the following members.

Constructors

  Name Description
Protected method CommandSetLibrary Creates a new CommandSetLibrary.

Top

Properties

  Name Description
Protected property CurrentDocData
Protected property CurrentDocumentSelection
Protected property CurrentModelingDocView
Protected property CurrentSelection
Protected property MenuService
Protected property MonitorSelection
Protected property ServiceProvider
Protected property SingleDocumentSelection
Protected property SingleSelection

Top

Methods

  Name Description
Protected method CanDeleteSelectedItems Returns true if the selected items can be deleted.
Public method CreateObjRef Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
Protected method DeleteSelectedItems Delete the selected items.
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 a hash function for a particular type. (Inherited from Object.)
Public method GetLifetimeService Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Protected method GetMenuCommands Defines the list of menu commands that this CommandSet implements.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method Initialize Initialize the command set. Calls GetMenuCommands and caches the result.
Public method InitializeLifetimeService Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Protected method IsAnyDocumentSelectionCompartment True if any of the items in the selection list is a compartment.
Protected method IsAnyDocumentSelectionMoveableHostShape True if any of the items in the selection list is a moveable host shape, which cannot be deleted.
Protected method IsAnyDocumentSelectionUndeletable True if any of the shape items in the selection list cannot be deleted.
Protected method IsCurrentDiagramEmpty True if the diagram has no children.
Protected method IsDiagramSelected True if the diagram is selected.
Protected method IsSingleDocumentSelection True if there is only one selected item on the active document.
Protected method IsSingleSelection True if there is only one selected item on the active document window or tool window.
Protected method MemberwiseClone() Creates a shallow copy of the current Object. (Inherited from Object.)
Protected method MemberwiseClone(Boolean) Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Remarks

For more information, see How to: Add a Command to the Shortcut Menu.

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.Modeling.Shell Namespace