IVsExpansionSession.GetFieldSpan(String, TextSpan[]) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Retrieves the span (the position and extent) of the specified field.
public:
int GetFieldSpan(System::String ^ bstrField, cli::array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ ptsSpan);
public:
int GetFieldSpan(Platform::String ^ bstrField, Platform::Array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ ptsSpan);
int GetFieldSpan(std::wstring const & bstrField, std::Array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> const & ptsSpan);
public int GetFieldSpan (string bstrField, Microsoft.VisualStudio.TextManager.Interop.TextSpan[] ptsSpan);
abstract member GetFieldSpan : string * Microsoft.VisualStudio.TextManager.Interop.TextSpan[] -> int
Public Function GetFieldSpan (bstrField As String, ptsSpan As TextSpan()) As Integer
Parameters
- bstrField
- String
[in] The name of the field.
- ptsSpan
- TextSpan[]
[out] The span of the field.
Returns
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.