IVsTextBufferCoordinator.MapPrimaryToSecondarySpan Method

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

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

Syntax

'宣言
Function MapPrimaryToSecondarySpan ( _
    tsPrimary As TextSpan, _
    <OutAttribute> ptsSecondary As TextSpan() _
) As Integer
'使用
Dim instance As IVsTextBufferCoordinator
Dim tsPrimary As TextSpan
Dim ptsSecondary As TextSpan()
Dim returnValue As Integer

returnValue = instance.MapPrimaryToSecondarySpan(tsPrimary, _
    ptsSecondary)
int MapPrimaryToSecondarySpan(
    TextSpan tsPrimary,
    TextSpan[] ptsSecondary
)
int MapPrimaryToSecondarySpan(
    [InAttribute] TextSpan tsPrimary, 
    [OutAttribute] array<TextSpan>^ ptsSecondary
)
function MapPrimaryToSecondarySpan(
    tsPrimary : TextSpan, 
    ptsSecondary : TextSpan[]
) : int

Parameters

  • ptsSecondary
    Type: []

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

Return Value

Type: System.Int32

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

Remarks

COM Signature

From singlefileeditor.idl:

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

Permissions

See Also

Reference

IVsTextBufferCoordinator Interface

IVsTextBufferCoordinator Members

Microsoft.VisualStudio.TextManager.Interop Namespace