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
'Declaration
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
- pBuffer
Type: Microsoft.VisualStudio.TextManager.Interop.IVsTextLines
[in] An IVsTextLines object that represents the text buffer which contains the text to be formatted.
- ts
Type: array<Microsoft.VisualStudio.TextManager.Interop.TextSpan[]
[in] A TextSpan object that describes the span (a pair of beginning and ending positions) of text that is to be formatted.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.