Udostępnij za pośrednictwem


IVsTextBufferCoordinator.MapSecondaryToPrimarySpan Method

Definition

Maps the specified position in the secondary buffer to a position in the primary buffer.

public:
 int MapSecondaryToPrimarySpan(Microsoft::VisualStudio::TextManager::Interop::TextSpan tsSecondary, cli::array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ ptsPrimary);
public:
 int MapSecondaryToPrimarySpan(Microsoft::VisualStudio::TextManager::Interop::TextSpan tsSecondary, Platform::Array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ ptsPrimary);
int MapSecondaryToPrimarySpan(Microsoft::VisualStudio::TextManager::Interop::TextSpan tsSecondary, std::Array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> const & ptsPrimary);
public int MapSecondaryToPrimarySpan (Microsoft.VisualStudio.TextManager.Interop.TextSpan tsSecondary, Microsoft.VisualStudio.TextManager.Interop.TextSpan[] ptsPrimary);
abstract member MapSecondaryToPrimarySpan : Microsoft.VisualStudio.TextManager.Interop.TextSpan * Microsoft.VisualStudio.TextManager.Interop.TextSpan[] -> int
Public Function MapSecondaryToPrimarySpan (tsSecondary As TextSpan, ptsPrimary As TextSpan()) As Integer

Parameters

tsSecondary
TextSpan

[in] A TextSpan object describing a position in the secondary buffer.

ptsPrimary
TextSpan[]

[in, out] A TextSpan object that is filled in with the corresponding position in the primary buffer.

Returns

If successful, returns S_OK; otherwise, returns an error code.

Remarks

COM Signature

From singlefileeditor.idl:

HRESULT MapSecondaryToPrimarySpan(  
   [in]  TextSpan  tsSecondary,  
   [out] TextSpan *ptsPrimary  
);  

Applies to