共用方式為


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
)
abstract MapPrimaryToSecondarySpan : 
        tsPrimary:TextSpan * 
        ptsSecondary:TextSpan[] byref -> int 
function MapPrimaryToSecondarySpan(
    tsPrimary : TextSpan, 
    ptsSecondary : TextSpan[]
) : int

Parameters

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
);

.NET Framework Security

See Also

Reference

IVsTextBufferCoordinator Interface

IVsTextBufferCoordinator Members

Microsoft.VisualStudio.TextManager.Interop Namespace