Freigeben über


IVsExpansionClient.FormatSpan(IVsTextLines, TextSpan[]) Method

Definition

Called to format the specified span in the specified text buffer.

public:
 int FormatSpan(Microsoft::VisualStudio::TextManager::Interop::IVsTextLines ^ pBuffer, cli::array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ ts);
public:
 int FormatSpan(Microsoft::VisualStudio::TextManager::Interop::IVsTextLines ^ pBuffer, Platform::Array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ ts);
int FormatSpan(Microsoft::VisualStudio::TextManager::Interop::IVsTextLines const & pBuffer, std::Array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> const & ts);
public int FormatSpan (Microsoft.VisualStudio.TextManager.Interop.IVsTextLines pBuffer, Microsoft.VisualStudio.TextManager.Interop.TextSpan[] ts);
abstract member FormatSpan : Microsoft.VisualStudio.TextManager.Interop.IVsTextLines * Microsoft.VisualStudio.TextManager.Interop.TextSpan[] -> int
Public Function FormatSpan (pBuffer As IVsTextLines, ts As TextSpan()) As Integer

Parameters

pBuffer
IVsTextLines

[in] An IVsTextLines object that represents the text buffer which contains the text to be formatted.

ts
TextSpan[]

[in] A TextSpan object that describes the span (a pair of beginning and ending positions) of text that is to be formatted.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From textmgr2.idl:

HRESULT IVsExpansionClient::FormatSpan(  
   [in]IVsTextLines *pBuffer,  
   [in]TextSpan *ts  
);  

The specified span describes the extent of the code snippet after it has been inserted. Formatting typically involves inserting tabs or spaces to position the snippet relative to the code around the snippet.

Applies to