Partilhar via


IVsExpansionClient.FormatSpan Method

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

Namespace:  Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop.8.0 (in Microsoft.VisualStudio.TextManager.Interop.8.0.dll)

Syntax

'Declaração
Function FormatSpan ( _
    pBuffer As IVsTextLines, _
    ts As TextSpan() _
) As Integer
int FormatSpan(
    IVsTextLines pBuffer,
    TextSpan[] ts
)
int FormatSpan(
    [InAttribute] IVsTextLines^ pBuffer, 
    [InAttribute] array<TextSpan>^ ts
)
abstract FormatSpan : 
        pBuffer:IVsTextLines * 
        ts:TextSpan[] -> int 
function FormatSpan(
    pBuffer : IVsTextLines, 
    ts : TextSpan[]
) : int

Parameters

Return Value

Type: System.Int32
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.

.NET Framework Security

See Also

Reference

IVsExpansionClient Interface

Microsoft.VisualStudio.TextManager.Interop Namespace