Share via


IVsContainedCode Interface

Implemented by a language to support buffer span mapping.

Namespace:  Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop.8.0 (in Microsoft.VisualStudio.TextManager.Interop.8.0.dll)

Syntax

'Declaration
<GuidAttribute("171A72AE-BAE6-4B66-9A58-4691F08ED9F2")> _
<InterfaceTypeAttribute()> _
Public Interface IVsContainedCode
[GuidAttribute("171A72AE-BAE6-4B66-9A58-4691F08ED9F2")]
[InterfaceTypeAttribute()]
public interface IVsContainedCode
[GuidAttribute(L"171A72AE-BAE6-4B66-9A58-4691F08ED9F2")]
[InterfaceTypeAttribute()]
public interface class IVsContainedCode
[<GuidAttribute("171A72AE-BAE6-4B66-9A58-4691F08ED9F2")>]
[<InterfaceTypeAttribute()>]
type IVsContainedCode =  interface end
public interface IVsContainedCode

The IVsContainedCode type exposes the following members.

Methods

  Name Description
Public method EnumOriginalCodeBlocks Returns an enumerator of original code block mappings.
Public method HostSpansUpdated Notifies the provider of the code spans that the buffer coordinator has been updated with new spans.

Top

Remarks

Code blocks that are embedded or contained in another document are typically put into a separate buffer to be passed to a language service for display and parsing. However, the code blocks must be displayed to the user in the original document. This requires the capability of mapping between the original buffer that contains the document with the embedded code block and the separate buffer that contains just the code block. This interface is represents the code blocks in the original document.

Notes to Implementers

This interface is typically implemented on the same object that implements the IVsContainedLanguage interface.

Notes to Callers

Obtain this interface by calling the QueryInterface method on an IVsContainedLanguage object or by casting the IVsContainedLanguage object to the IVsContainedCode interface.

See Also

Reference

Microsoft.VisualStudio.TextManager.Interop Namespace