次の方法で共有


IVsTextBufferCoordinator.MapPrimaryToSecondarySpan Method

Definition

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

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

Parameters

tsPrimary
TextSpan

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

ptsSecondary
TextSpan[]

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

Returns

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

Remarks

COM Signature

From singlefileeditor.idl:

HRESULT MapPrimaryToSecondarySpan(  
   [in]  TextSpan  tsPrimary,  
   [out] TextSpan *ptsSecondary  
);  

Applies to