共用方式為


CommandSetLibrary 類別

CommandSet 和 ClipboardCommandSet 的基底類別。 提供與目前的選取範圍、 圖表、 視窗及服務的存取。

此 API 不符合 CLS 標準。 

繼承階層架構

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

命名空間:  Microsoft.VisualStudio.Modeling.Shell
組件:  Microsoft.VisualStudio.Modeling.Sdk.Shell.11.0 (在 Microsoft.VisualStudio.Modeling.Sdk.Shell.11.0.dll 中)

語法

'宣告
<CLSCompliantAttribute(False)> _
Public MustInherit Class CommandSetLibrary _
    Inherits MarshalByRefObject
[CLSCompliantAttribute(false)]
public abstract class CommandSetLibrary : MarshalByRefObject

CommandSetLibrary 型別會公開下列成員。

建構函式

  名稱 說明
受保護的方法 CommandSetLibrary 建立新的 CommandSetLibrary。

回頁首

屬性

  名稱 說明
受保護的屬性 CurrentDocData
受保護的屬性 CurrentDocumentSelection
受保護的屬性 CurrentModelingDocView
受保護的屬性 CurrentSelection
受保護的屬性 MenuService
受保護的屬性 MonitorSelection
受保護的屬性 ServiceProvider
受保護的屬性 SingleDocumentSelection
受保護的屬性 SingleSelection

回頁首

方法

  名稱 說明
受保護的方法 CanDeleteSelectedItems 如果可以刪除選取的項目,則傳回 true。
公用方法 CreateObjRef 安全性關鍵。建立包含所有相關資訊的物件,這些資訊是產生用來與遠端物件通訊的所需 Proxy。 (繼承自 MarshalByRefObject)。
受保護的方法 DeleteSelectedItems 刪除選取的項目。
公用方法 Equals 判斷指定的物件是否等於目前物件。 (繼承自 Object)。
受保護的方法 Finalize 允許物件在記憶體回收進行回收之前,嘗試釋放資源並執行其他清除作業。 (繼承自 Object)。
公用方法 GetHashCode 做為特定型別的雜湊函式。 (繼承自 Object)。
公用方法 GetLifetimeService 安全性關鍵。擷取控制這個執行個體存留期 (Lifetime) 原則的目前存留期服務物件。 (繼承自 MarshalByRefObject)。
受保護的方法 GetMenuCommands 定義此 CommandSet 實作的功能表命令的清單。
公用方法 GetType 取得目前執行個體的 Type。 (繼承自 Object)。
公用方法 Initialize 初始化命令集。呼叫 GetMenuCommands 和快取結果。
公用方法 InitializeLifetimeService 安全性關鍵。取得存留期服務物件來控制這個執行個體的存留期原則。 (繼承自 MarshalByRefObject)。
受保護的方法 IsAnyDocumentSelectionCompartment 如果有的話,則為 true 的選取範圍中的項目清單是區間。
受保護的方法 IsAnyDocumentSelectionMoveableHostShape 是否有任何的選擇清單中的項目,則為 true,則是可移動的主圖形,無法刪除。
受保護的方法 IsAnyDocumentSelectionUndeletable 如果有的話,則為 true 的圖形的選擇清單中的項目無法刪除。
受保護的方法 IsCurrentDiagramEmpty 如果圖表沒有子項目,則為 true。
受保護的方法 IsDiagramSelected 會選取該圖表,其值為 true。
受保護的方法 IsSingleDocumentSelection 如果在使用中文件上只能有一個選取的項目,則為 true。
受保護的方法 IsSingleSelection 如果沒有在使用中文件視窗或 [工具] 視窗上只能有一個選取的項目,則為 true。
受保護的方法 MemberwiseClone() 建立目前 Object 的淺層複本 (Shallow Copy)。 (繼承自 Object)。
受保護的方法 MemberwiseClone(Boolean) 建立目前 MarshalByRefObject 物件的淺層複本。 (繼承自 MarshalByRefObject)。
公用方法 ToString 傳回表示目前物件的字串。 (繼承自 Object)。

回頁首

備註

如需詳細資訊,請參閱 HOW TO:在捷徑功能表中加入命令

執行緒安全

這個型別的任何 Public static (在 Visual Basic 中為 Shared) 成員都具備執行緒安全。不保證任何執行個體成員是安全執行緒。

請參閱

參考

Microsoft.VisualStudio.Modeling.Shell 命名空間