IVsTextLayer.MapLocalSpansToTextOriginatingLayer Method

Definition

Maps a set of local spans to the shallowest layer that originates text.

public:
 int MapLocalSpansToTextOriginatingLayer(System::UInt32 dwFlags, Microsoft::VisualStudio::TextManager::Interop::IVsEnumTextSpans ^ pLocalSpanEnum, [Runtime::InteropServices::Out] Microsoft::VisualStudio::TextManager::Interop::IVsTextLayer ^ % ppTargetLayer, [Runtime::InteropServices::Out] Microsoft::VisualStudio::TextManager::Interop::IVsEnumTextSpans ^ % ppTargetSpanEnum);
public:
 int MapLocalSpansToTextOriginatingLayer(unsigned int dwFlags, Microsoft::VisualStudio::TextManager::Interop::IVsEnumTextSpans ^ pLocalSpanEnum, [Runtime::InteropServices::Out] Microsoft::VisualStudio::TextManager::Interop::IVsTextLayer ^ &  ppTargetLayer, [Runtime::InteropServices::Out] Microsoft::VisualStudio::TextManager::Interop::IVsEnumTextSpans ^ &  ppTargetSpanEnum);
int MapLocalSpansToTextOriginatingLayer(unsigned int dwFlags, Microsoft::VisualStudio::TextManager::Interop::IVsEnumTextSpans const & pLocalSpanEnum, [Runtime::InteropServices::Out] Microsoft::VisualStudio::TextManager::Interop::IVsTextLayer const & & ppTargetLayer, [Runtime::InteropServices::Out] Microsoft::VisualStudio::TextManager::Interop::IVsEnumTextSpans const & & ppTargetSpanEnum);
public int MapLocalSpansToTextOriginatingLayer (uint dwFlags, Microsoft.VisualStudio.TextManager.Interop.IVsEnumTextSpans pLocalSpanEnum, out Microsoft.VisualStudio.TextManager.Interop.IVsTextLayer ppTargetLayer, out Microsoft.VisualStudio.TextManager.Interop.IVsEnumTextSpans ppTargetSpanEnum);
abstract member MapLocalSpansToTextOriginatingLayer : uint32 * Microsoft.VisualStudio.TextManager.Interop.IVsEnumTextSpans * IVsTextLayer * IVsEnumTextSpans -> int
Public Function MapLocalSpansToTextOriginatingLayer (dwFlags As UInteger, pLocalSpanEnum As IVsEnumTextSpans, ByRef ppTargetLayer As IVsTextLayer, ByRef ppTargetSpanEnum As IVsEnumTextSpans) As Integer

Parameters

dwFlags
UInt32

[in] One of the MapLocalSpanFlags values.

pLocalSpanEnum
IVsEnumTextSpans

[in] The local text spans to be mapped.

ppTargetLayer
IVsTextLayer

[out] The shallowest layer that originates text.

ppTargetSpanEnum
IVsEnumTextSpans

[out] The mapped layer set of text spans.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From textmgr.idl:

HRESULT IVsTextLayer::MapLocalSpansToTextOriginatingLayer(  
   [in] DWORD dwFlags,  
   [in] IVsEnumTextSpans *pLocalSpanEnum,  
   [out] IVsTextLayer **ppTargetLayer,  
   [out] IVsEnumTextSpans **ppTargetSpanEnum  
);  

MapLocalSpansToTextOriginatingLayer will take a set of local spans and map them down to the shallowest layer that originates text. You are not guaranteed that you will get back the layer that actually originates a given set of text, that is, text which excludes non-text atoms.

Applies to