共用方式為


CodeDelegate 介面

表示原始程式碼中委派的物件。

命名空間:  EnvDTE
組件:  EnvDTE (在 EnvDTE.dll 中)

語法

'宣告
<GuidAttribute("B1F42513-91CD-4D3A-8B25-A317D8032B24")> _
Public Interface CodeDelegate
[GuidAttribute("B1F42513-91CD-4D3A-8B25-A317D8032B24")]
public interface CodeDelegate
[GuidAttribute(L"B1F42513-91CD-4D3A-8B25-A317D8032B24")]
public interface class CodeDelegate
[<GuidAttribute("B1F42513-91CD-4D3A-8B25-A317D8032B24")>]
type CodeDelegate =  interface end
public interface CodeDelegate

CodeDelegate 型別會公開下列成員。

屬性

  名稱 說明
公用屬性 Access 設定或取得此委派的存取屬性 (Attribute)。
公用屬性 Attributes 取得委派所有屬性 (Attribute) 的集合。
公用屬性 BaseClass 取得此 CodeDelegate 物件據以衍生的類別。
公用屬性 Bases 取得衍生出此委派的類別集合。
公用屬性 Children 取得包含在 CodeDelegate 之中的物件集合。
公用屬性 Collection 傳回包含支援這項屬性 (Property) 之 CodeDelegate 物件的集合。
公用屬性 Comment 取得或設定與 CodeDelegate 關聯的註解。
公用屬性 DerivedTypes 取得從 CodeDelegate 物件衍生的物件集合。尚未在 Visual C# 中進行實作。
公用屬性 DocComment 設定或取得 CodeDelegate 項目的文件註解。
公用屬性 DTE 取得最上層的擴充性物件。
公用屬性 EndPoint 取得位於委派尾端的文字位置。
公用屬性 Extender 傳回委派所要求的擴充項物件。尚未在 Visual C# 中進行實作。
公用屬性 ExtenderCATID 取得 CodeDelegate 物件的擴充項分類 ID (CATID)。尚未在 Visual C# 中進行實作。
公用屬性 ExtenderNames 取得委派的可用擴充項清單。尚未在 Visual C# 中進行實作。
公用屬性 FullName 取得委派檔案的完整路徑和名稱。
公用屬性 InfoLocation 取得委派的程式碼模型功能。
公用屬性 IsCodeType 指出是否可自此委派取得 CodeType 物件。
公用屬性 IsDerivedFrom 指出 CodeDelegate 物件是否具有另一個物件做為基底。
公用屬性 Kind 取得列舉型別,定義物件的型別。
公用屬性 Language 取得程式語言,用以撰寫程式碼。
公用屬性 Members 取得此 CodeDelegate 元素所包含的項目集合。
公用屬性 Name 設定或取得 CodeDelegate 物件的名稱。
公用屬性 Namespace 取得定義委派之父命名空間的物件。
公用屬性 Parameters 取得此 CodeDelegate 的參數集合。
公用屬性 Parent 取得 CodeDelegate 物件的直接上層父物件。
公用屬性 ProjectItem 取得與這個 CodeDelegate 物件關聯的 ProjectItem 物件。
公用屬性 Prototype 傳回具有此委派之 Stub 定義的字串。
公用屬性 StartPoint 取得 TextPoint 物件,此物件定義委派的開頭。
公用屬性 Type 設定或取得物件,表示委派的程式設計型別。

回頁首

方法

  名稱 說明
公用方法 AddAttribute 建立新的屬性程式碼建構,並在正確位置插入程式碼。
公用方法 AddBase 將項目加入至繼承之物件的清單中。
公用方法 AddParameter 建立委派的新參數,並在正確位置插入程式碼。
公用方法 GetEndPoint 傳回 TextPoint 物件,此物件會標示委派定義尾端。
公用方法 GetStartPoint 傳回 TextPoint 物件,此物件會定義委派定義開頭。
公用方法 RemoveBase 從基底清單中移除物件。
公用方法 RemoveMember 從委派中移除成員。
公用方法 RemoveParameter 從委派的引數清單中移除參數。

回頁首

備註

注意事項注意事項

在特定類型的編輯之後,程式碼模型項目 (例如類別、結構、函式、屬性、委派等) 的值可能不具決定性,表示其值不一定維持相同。 如需詳細資訊,請參閱使用程式碼模型探索程式碼 (Visual Basic) 的<程式碼模型項目值可以變更>一節。

請參閱

參考

EnvDTE 命名空間

其他資源

HOW TO:編譯和執行 Automation 物件模型程式碼範例

使用程式碼模型探索程式碼 (Visual Basic)

使用程式碼模型探索程式碼 (Visual C#)