IVsTextBufferCoordinator.MapSecondaryToPrimarySpan Method

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

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

Syntax

'宣言
Function MapSecondaryToPrimarySpan ( _
    tsSecondary As TextSpan, _
    <OutAttribute> ptsPrimary As TextSpan() _
) As Integer
'使用
Dim instance As IVsTextBufferCoordinator
Dim tsSecondary As TextSpan
Dim ptsPrimary As TextSpan()
Dim returnValue As Integer

returnValue = instance.MapSecondaryToPrimarySpan(tsSecondary, _
    ptsPrimary)
int MapSecondaryToPrimarySpan(
    TextSpan tsSecondary,
    TextSpan[] ptsPrimary
)
int MapSecondaryToPrimarySpan(
    [InAttribute] TextSpan tsSecondary, 
    [OutAttribute] array<TextSpan>^ ptsPrimary
)
function MapSecondaryToPrimarySpan(
    tsSecondary : TextSpan, 
    ptsPrimary : TextSpan[]
) : int

Parameters

  • ptsPrimary
    Type: []

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

Return Value

Type: System.Int32

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

Remarks

COM Signature

From singlefileeditor.idl:

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

Permissions

See Also

Reference

IVsTextBufferCoordinator Interface

IVsTextBufferCoordinator Members

Microsoft.VisualStudio.TextManager.Interop Namespace