AuthoringScope.GetDeclarations Method (IVsTextView, Int32, Int32, TokenInfo, ParseReason)
Returns a list of declarations based on the specified reason for parsing.
Assembly: Microsoft.VisualStudio.Package.LanguageService.14.0 (in Microsoft.VisualStudio.Package.LanguageService.14.0.dll)
public abstract Declarations GetDeclarations( IVsTextView view, int line, int col, TokenInfo info, ParseReason reason )
[in] An IVsTextView object that can be used to access the source.
[in] The line number where the parse operation started.
[in] The offset into the line where the parse operation started.
[in] A TokenInfo structure containing information about the token at the specified position.
This method is used to obtain a list of member declarations based on the given position in the source code in order to support the IntelliSense members list (a list of all members for a particular class or scope). Note that the parse operation has been completed by the time this method is called.
In the default managed package framework implementation, the Source class method Completion is called to present a list of declarations the user can select from to complete the entry of a particular identifier. The call to Completion is triggered when a parse operation returns a MemberSelect and the user is typing a character. Completion executes a parse operation and when the parse is complete, the method is called to return the list of declarations to display. Note that the returned Declarations object is always your implementation of the Declarations class.