Share via


IVsaCodeItem Interface

Note: This API is now obsolete.

Represents a code item to be compiled by the script engine.

Namespace:  Microsoft.Vsa
Assembly:  Microsoft.Vsa (in Microsoft.Vsa.dll)

Syntax

'Declaration
<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

The IVsaCodeItem type exposes the following members.

Properties

  Name Description
Public property CodeDOM Gets the code document object model (CodeDOM) represented in the code item.
Public property IsDirty Returns a value indicating whether the current in-memory representation of the item differs from the persisted representation. (Inherited from IVsaItem.)
Public property ItemType Gets the specified object's type, as determined by the IVsaItems.CreateItem Method method. (Inherited from IVsaItem.)
Public property Name Sets or gets the name of the item. (Inherited from IVsaItem.)
Public property SourceText Sets or gets the text of a specified code item, including auto-generated code, if any.

Top

Methods

  Name Description
Public method AddEventSource Adds an event source to the code item. The code item uses the event source to hook up an event to the named event source by calling the IVsaSite.GetEventSourceInstance method, which is implemented by the host.
Public method AppendSourceText Appends specified text to the end of the code item.
Public method GetOption Gets implementation-specific options for a script engine. (Inherited from IVsaItem.)
Public method RemoveEventSource Removes the specified event source from the code item.
Public method SetOption Sets implementation-specific options for a script engine. (Inherited from IVsaItem.)

Top

Remarks

The specified code item can contain classes, modules, or other source text.

No permissions are required for calling any members of the IVsaCodeItem interface.

The script engine implements this interface in order to add code items.

See Also

Reference

Microsoft.Vsa Namespace