IVsTextLines.CreateLineMarker(Int32, Int32, Int32, Int32, Int32, IVsTextMarkerClient, IVsTextLineMarker[]) Método

Definição

Cria um marcador de um tipo específico na região especificada.

public:
 int CreateLineMarker(int iMarkerType, int iStartLine, int iStartIndex, int iEndLine, int iEndIndex, Microsoft::VisualStudio::TextManager::Interop::IVsTextMarkerClient ^ pClient, cli::array <Microsoft::VisualStudio::TextManager::Interop::IVsTextLineMarker ^> ^ ppMarker);
public:
 int CreateLineMarker(int iMarkerType, int iStartLine, int iStartIndex, int iEndLine, int iEndIndex, Microsoft::VisualStudio::TextManager::Interop::IVsTextMarkerClient ^ pClient, Platform::Array <Microsoft::VisualStudio::TextManager::Interop::IVsTextLineMarker ^> ^ ppMarker);
int CreateLineMarker(int iMarkerType, int iStartLine, int iStartIndex, int iEndLine, int iEndIndex, Microsoft::VisualStudio::TextManager::Interop::IVsTextMarkerClient const & pClient, std::Array <Microsoft::VisualStudio::TextManager::Interop::IVsTextLineMarker const &> const & ppMarker);
public int CreateLineMarker (int iMarkerType, int iStartLine, int iStartIndex, int iEndLine, int iEndIndex, Microsoft.VisualStudio.TextManager.Interop.IVsTextMarkerClient pClient, Microsoft.VisualStudio.TextManager.Interop.IVsTextLineMarker[] ppMarker);
abstract member CreateLineMarker : int * int * int * int * int * Microsoft.VisualStudio.TextManager.Interop.IVsTextMarkerClient * Microsoft.VisualStudio.TextManager.Interop.IVsTextLineMarker[] -> int
Public Function CreateLineMarker (iMarkerType As Integer, iStartLine As Integer, iStartIndex As Integer, iEndLine As Integer, iEndIndex As Integer, pClient As IVsTextMarkerClient, ppMarker As IVsTextLineMarker()) As Integer

Parâmetros

iMarkerType
Int32

no Tipo de marcador a ser criado.

iStartLine
Int32

no Linha inicial.

iStartIndex
Int32

no Índice de caractere inicial dentro da linha. Deve ser menor ou igual ao comprimento da linha.

iEndLine
Int32

no Linha final.

iEndIndex
Int32

no Índice de caractere final dentro da linha. Deve ser menor ou igual ao comprimento da linha.

pClient
IVsTextMarkerClient

no Ponteiro para a IVsTextMarkerClient interface. Implemente essa interface para aconselhar o buffer de texto que você deseja receber a notificação de eventos de marcador.

ppMarker
IVsTextLineMarker[]

fora Ponteiro para a IVsTextLineMarker interface (ou seja, o marcador de texto). Se esse parâmetro for nulo, o marcador será de Propriedade do buffer de texto. Um exemplo de um marcador de Propriedade do buffer é um indicador temporário.

Retornos

Int32

Se o método for bem-sucedido, retornará S_OK. Se falhar, retornará um código de erro.

Comentários

Assinatura COM

De textmgr. idl:

HRESULT IVsTextLines::CreateLineMarker(  
   [in] long iMarkerType,  
   [in] long iStartLine,  
   [in] CharIndex iStartIndex,  
   [in] long iEndLine,  
   [in] CharIndex iEndIndex,  
   [in] IVsTextMarkerClient * pClient,  
   [out] IVsTextLineMarker ** ppMarker  
);  

Esse método cria um marcador na região especificada. Se você quiser escutar eventos de marcador para o buffer, passe um ponteiro para a IVsTextMarkerClient interface no pClient parâmetro.

Observação

Os marcadores criados usando o IVsTextLines.CreateLineMarker são marcadores orientados por linha. Use CreateStreamMarker para criar marcadores orientados a fluxo.

Aplica-se a