Compartir a través de


ExpansionProvider.FormatSpan(IVsTextLines, TextSpan[]) Method

Definition

Formats the specified text span.

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

Parameters

buffer
IVsTextLines

The IVsTextLines buffer.

ts
TextSpan[]

An array of TextSpan objects.

Returns

Microsoft.VisualStudio.NativeMethods.S_OK if the method succeeded, otherwise Microsoft.VisualStudio.NativeMethods.E_NOTIMPL.

Implements

Remarks

This method first checks that buffer is the same as the IVsTextLines in the Source, and throws an ArgumentException if they are not. If format selection is enabled, this method iterates through the array of TextSpan objects and formats them.

Applies to