AuthoringScope.GetDeclarations Method
Returns a list of declarations based on the specified reason for parsing.
Namespace: Microsoft.VisualStudio.Package
Assemblies: Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
Syntax
‘선언
Public MustOverride Function GetDeclarations ( _
view As IVsTextView, _
line As Integer, _
col As Integer, _
info As TokenInfo, _
reason As ParseReason _
) As Declarations
‘사용 방법
Dim instance As AuthoringScope
Dim view As IVsTextView
Dim line As Integer
Dim col As Integer
Dim info As TokenInfo
Dim reason As ParseReason
Dim returnValue As Declarations
returnValue = instance.GetDeclarations(view, _
line, col, info, reason)
public abstract Declarations GetDeclarations(
IVsTextView view,
int line,
int col,
TokenInfo info,
ParseReason reason
)
public:
virtual Declarations^ GetDeclarations(
IVsTextView^ view,
int line,
int col,
TokenInfo^ info,
ParseReason reason
) abstract
abstract GetDeclarations :
view:IVsTextView *
line:int *
col:int *
info:TokenInfo *
reason:ParseReason -> Declarations
public abstract function GetDeclarations(
view : IVsTextView,
line : int,
col : int,
info : TokenInfo,
reason : ParseReason
) : Declarations
Parameters
- view
Type: Microsoft.VisualStudio.TextManager.Interop.IVsTextView
[in] An IVsTextView object that can be used to access the source.
- line
Type: System.Int32
[in] The line number where the parse operation started.
- col
Type: System.Int32
[in] The offset into the line where the parse operation started.
- info
Type: Microsoft.VisualStudio.Package.TokenInfo
[in] A TokenInfo structure containing information about the token at the specified position.
- reason
Type: Microsoft.VisualStudio.Package.ParseReason
[in] The ParseReason value describing what kind of parse operation was completed.
Return Value
Type: Microsoft.VisualStudio.Package.Declarations
If successful returns a Declarations object; otherwise, returns a null value.
Remarks
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 GetDeclarations 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.
.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.