共用方式為


IVsaCodeItem 介面

注意:這個 API 現在已經過時。

代表要由指令碼引擎編譯的程式碼項目。

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

語法

'宣告
<ObsoleteAttribute("Use of this type is not recommended because it is being deprecated in Visual Studio 2005; there will be no replacement for this feature. Please see the ICodeCompiler documentation for additional help.")> _
<InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)> _
<GuidAttribute("E0C0FFE7-7eea-4ee5-b7e4-0080c7eb0b74")> _
Public Interface IVsaCodeItem _
    Inherits IVsaItem
[ObsoleteAttribute("Use of this type is not recommended because it is being deprecated in Visual Studio 2005; there will be no replacement for this feature. Please see the ICodeCompiler documentation for additional help.")]
[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
[GuidAttribute("E0C0FFE7-7eea-4ee5-b7e4-0080c7eb0b74")]
public interface IVsaCodeItem : IVsaItem
[ObsoleteAttribute(L"Use of this type is not recommended because it is being deprecated in Visual Studio 2005; there will be no replacement for this feature. Please see the ICodeCompiler documentation for additional help.")]
[InterfaceTypeAttribute(ComInterfaceType::InterfaceIsIUnknown)]
[GuidAttribute(L"E0C0FFE7-7eea-4ee5-b7e4-0080c7eb0b74")]
public interface class IVsaCodeItem : IVsaItem
[<ObsoleteAttribute("Use of this type is not recommended because it is being deprecated in Visual Studio 2005; there will be no replacement for this feature. Please see the ICodeCompiler documentation for additional help.")>]
[<InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)>]
[<GuidAttribute("E0C0FFE7-7eea-4ee5-b7e4-0080c7eb0b74")>]
type IVsaCodeItem =  
    interface 
        interface IVsaItem 
    end
public interface IVsaCodeItem extends IVsaItem

IVsaCodeItem 類型會公開下列成員。

屬性

  名稱 描述
公用屬性 CodeDOM 取得程式碼項目中所代表的程式碼文件物件模型 (CodeDOM)。
公用屬性 IsDirty 傳回值,指出項目目前的記憶體中表示與保存的表示是否有所不同。 (繼承自 IVsaItem)。
公用屬性 ItemType 取得 IVsaItems.CreateItem Method 方法所決定的指定物件類型。 (繼承自 IVsaItem)。
公用屬性 Name 設定或取得項目的名稱。 (繼承自 IVsaItem)。
公用屬性 SourceText 設定或取得指定程式碼項目的文字,包含任何自動產生的程式碼。

回頁首

方法

  名稱 描述
公用方法 AddEventSource 將事件來源加入程式碼項目。程式碼項目會使用事件來源,藉由呼叫主機實作的 IVsaSite.GetEventSourceInstance 方法將事件連結至具名事件來源。
公用方法 AppendSourceText 將指定的文字附加至程式碼項目結尾。
公用方法 GetOption 取得指令碼引擎的實作特定選項。 (繼承自 IVsaItem)。
公用方法 RemoveEventSource 從程式碼項目中移除指定的事件來源。
公用方法 SetOption 設定指令碼引擎的實作特定選項。 (繼承自 IVsaItem)。

回頁首

備註

指定的代码项目可以包含类、 模块或其他源文本。

所需的调用 IVsaCodeItem 接口的任何成员没有权限。

脚本引擎实现此接口,以便添加代码项。

請參閱

參考

Microsoft.Vsa 命名空間