Udostępnij za pośrednictwem


VsTextBufferCoordinatorClass.GetMappingOfPrimaryPosition Method

Definition

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

public:
 virtual int GetMappingOfPrimaryPosition(int lPosition, cli::array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ ptsPrimary, cli::array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ ptsSecondary) = Microsoft::VisualStudio::TextManager::Interop::IVsTextBufferCoordinator::GetMappingOfPrimaryPosition;
public:
 virtual int GetMappingOfPrimaryPosition(int lPosition, cli::array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ ptsPrimary, cli::array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ ptsSecondary);
public:
 virtual int GetMappingOfPrimaryPosition(int lPosition, Platform::Array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ ptsPrimary, Platform::Array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ ptsSecondary) = Microsoft::VisualStudio::TextManager::Interop::IVsTextBufferCoordinator::GetMappingOfPrimaryPosition;
 virtual int GetMappingOfPrimaryPosition(int lPosition, std::Array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> const & ptsPrimary, std::Array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> const & ptsSecondary);
public virtual int GetMappingOfPrimaryPosition (int lPosition, Microsoft.VisualStudio.TextManager.Interop.TextSpan[] ptsPrimary, Microsoft.VisualStudio.TextManager.Interop.TextSpan[] ptsSecondary);
abstract member GetMappingOfPrimaryPosition : int * Microsoft.VisualStudio.TextManager.Interop.TextSpan[] * Microsoft.VisualStudio.TextManager.Interop.TextSpan[] -> int
override this.GetMappingOfPrimaryPosition : int * Microsoft.VisualStudio.TextManager.Interop.TextSpan[] * Microsoft.VisualStudio.TextManager.Interop.TextSpan[] -> int
Public Overridable Function GetMappingOfPrimaryPosition (lPosition As Integer, ptsPrimary As TextSpan(), ptsSecondary As TextSpan()) As Integer

Parameters

lPosition
Int32

[in] A character offset into the primary buffer from the beginning of the buffer.

ptsPrimary
TextSpan[]

[in, out] A TextSpan object that is filled in with the line, offset pair in the primary buffer for the specified position.

ptsSecondary
TextSpan[]

[in, out] A TextSpan object that is filled in with the line, offset pair in the secondary buffer for the corresponding primary position.

Returns

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

Implements

Applies to