IVsTextBufferCoordinator.GetMappingOfPrimaryPosition Method
Maps the specified position in the primary buffer to the span 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 GetMappingOfPrimaryPosition ( _
lPosition As Integer, _
<OutAttribute> ptsPrimary As TextSpan(), _
<OutAttribute> ptsSecondary As TextSpan() _
) As Integer
int GetMappingOfPrimaryPosition(
int lPosition,
TextSpan[] ptsPrimary,
TextSpan[] ptsSecondary
)
int GetMappingOfPrimaryPosition(
[InAttribute] int lPosition,
[OutAttribute] array<TextSpan>^ ptsPrimary,
[OutAttribute] array<TextSpan>^ ptsSecondary
)
abstract GetMappingOfPrimaryPosition :
lPosition:int *
ptsPrimary:TextSpan[] byref *
ptsSecondary:TextSpan[] byref -> int
function GetMappingOfPrimaryPosition(
lPosition : int,
ptsPrimary : TextSpan[],
ptsSecondary : TextSpan[]
) : int
Parameters
- lPosition
Type: System.Int32
[in] A character offset into the primary buffer from the beginning of the buffer.
- ptsPrimary
Type: array<Microsoft.VisualStudio.TextManager.Interop.TextSpan[]
[in, out] A TextSpan object that is filled in with the line, offset pair in the primary buffer for the specified position.
- ptsSecondary
Type: array<Microsoft.VisualStudio.TextManager.Interop.TextSpan[]
[in, out] A TextSpan object that is filled in with the line, offset pair in the secondary buffer for the corresponding primary position.
Return Value
Type: System.Int32
If successful, returns S_OK; otherwise, returns an error code.
Remarks
COM Signature
From singlefileeditor.idl:
HRESULT GetMappingOfPrimaryPosition(
[in] long lPosition,
[out] TextSpan *ptsPrimary,
[out] TextSpan *ptsSecondary
);
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.