CodeImport 介面

將用以匯入命名空間的陳述句用法予以模式化。

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

語法

'宣告
<GuidAttribute("0C9A256E-0FF9-4D4A-88E6-304ACF78225F")> _
Public Interface CodeImport _
    Inherits CodeElement
[GuidAttribute("0C9A256E-0FF9-4D4A-88E6-304ACF78225F")]
public interface CodeImport : CodeElement
[GuidAttribute(L"0C9A256E-0FF9-4D4A-88E6-304ACF78225F")]
public interface class CodeImport : CodeElement
[<GuidAttribute("0C9A256E-0FF9-4D4A-88E6-304ACF78225F")>]
type CodeImport =  
    interface
        interface CodeElement
    end
public interface CodeImport extends CodeElement

CodeImport 型別會公開下列成員。

屬性

  名稱 說明
公用屬性 Alias 設定或取得參考命名空間的易記名稱。
公用屬性 Children (繼承自 CodeElement)。
公用屬性 Children 取得物件的集合,此集合包含在 CodeImport 中。
公用屬性 Collection (繼承自 CodeElement)。
公用屬性 Collection 取得 CodeElements 集合,此集合包含支援此屬性的 CodeImport
公用屬性 DTE (繼承自 CodeElement)。
公用屬性 DTE 取得最上層的擴充性物件。
公用屬性 EndPoint (繼承自 CodeElement)。
公用屬性 EndPoint 取得位於程式碼項目結尾的文字位置。
公用屬性 Extender[String] (繼承自 CodeElement)。
公用屬性 Extender[String] 取得要求的擴充項 (如果適用於這個 CodeElement 物件)。
公用屬性 ExtenderCATID (繼承自 CodeElement)。
公用屬性 ExtenderCATID 取得物件的擴充項分類 ID (CATID)。
公用屬性 ExtenderNames (繼承自 CodeElement)。
公用屬性 ExtenderNames 取得物件的可用擴充項清單。
公用屬性 FullName (繼承自 CodeElement)。
公用屬性 FullName 取得指定程式碼項目的完整名稱。
公用屬性 InfoLocation (繼承自 CodeElement)。
公用屬性 InfoLocation 取得程式碼模型的功能。
公用屬性 IsCodeType (繼承自 CodeElement)。
公用屬性 IsCodeType 取得值,指出是否可以從 CodeImport 物件取得 CodeType 物件。
公用屬性 Kind (繼承自 CodeElement)。
公用屬性 Kind 取得列舉型別,定義物件的型別。
公用屬性 Language (繼承自 CodeElement)。
公用屬性 Language 取得程式語言,用以撰寫 CodeImport。
公用屬性 Name (繼承自 CodeElement)。
公用屬性 Name 取得或設定 CodeImport 物件的名稱。
公用屬性 Namespace 取得或設定匯入的命名空間名稱。
公用屬性 Parent 取得包含此匯入內容的物件。
公用屬性 ProjectItem (繼承自 CodeElement)。
公用屬性 ProjectItem 取得與 CodeElement 物件關聯的 ProjectItem 物件。
公用屬性 StartPoint (繼承自 CodeElement)。
公用屬性 StartPoint 取得 TextPoint 物件,此物件定義 CodeImport 的開頭。

回頁首

方法

  名稱 說明
公用方法 GetEndPoint(vsCMPart) (繼承自 CodeElement)。
公用方法 GetEndPoint(vsCMPart) TextPoint 物件,用以標示程式碼項目定義的結尾。
公用方法 GetStartPoint(vsCMPart) (繼承自 CodeElement)。
公用方法 GetStartPoint(vsCMPart) 取得 TextPoint 物件,用以標示程式碼項目定義的開頭。

回頁首

備註

所使用的重要陳述式,需視其指定的語言模型而定。物件是繼承自 CodeElement

注意事項注意事項

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

請參閱

參考

EnvDTE80 命名空間

其他資源

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

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

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