IVsExpansionSession.GetFieldSpan Method

Retrieves the span (the position and extent) of the specified field.

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

Syntax

'Declaration
Function GetFieldSpan ( _
    bstrField As String, _
    <OutAttribute> ptsSpan As TextSpan() _
) As Integer
int GetFieldSpan(
    string bstrField,
    TextSpan[] ptsSpan
)
int GetFieldSpan(
    [InAttribute] String^ bstrField, 
    [OutAttribute] array<TextSpan>^ ptsSpan
)
abstract GetFieldSpan : 
        bstrField:string * 
        ptsSpan:TextSpan[] byref -> int
function GetFieldSpan(
    bstrField : String, 
    ptsSpan : 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 IVsExpansionSession::GetFieldSpan(
   [in] BSTR bstrField,
   [out]TextSpan *ptsSpan
);

The span of the field is the location of the field in the source buffer after the code snippet has been inserted and formatted. This method is typically called to retrieve the span of a field to highlight the field during the special edit mode.

.NET Framework Security

See Also

Reference

IVsExpansionSession Interface

Microsoft.VisualStudio.TextManager.Interop Namespace