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
- bstrField
Type: System.String
[in] The name of the field.
- ptsSpan
Type: array<Microsoft.VisualStudio.TextManager.Interop.TextSpan[]
[out] The span of the field.
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
- 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.