ExpansionProvider.GetExpansionSpan Method
Returns the span occupied by the snippet currently being edited.
Namespace: Microsoft.VisualStudio.Package
Assemblies: Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
Syntax
‘선언
Public Overridable Function GetExpansionSpan As TextSpan
‘사용 방법
Dim instance As ExpansionProvider
Dim returnValue As TextSpan
returnValue = instance.GetExpansionSpan()
public virtual TextSpan GetExpansionSpan()
public:
virtual TextSpan GetExpansionSpan()
abstract GetExpansionSpan : unit -> TextSpan
override GetExpansionSpan : unit -> TextSpan
public function GetExpansionSpan() : TextSpan
Return Value
Type: Microsoft.VisualStudio.TextManager.Interop.TextSpan
Returns a TextSpan object representing the snippet's span in the source file.
Remarks
The base method obtains the span by calling the GetSnippetSpan method on the IVsExpansionSession object representing the current snippet expansion session. This method assumes the expansion session has been set by a previous call to the InsertSpecificExpansion or InsertNamedExpansion methods.
In the default managed package framework's implementation of the language service classes, this method is called from the HandlePreExec method to determine where to put the edit caret when the Enter key is typed during a snippet edit session.
.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.