Compartilhar via


ExpansionProvider.GetExpansionSpan Method

Definition

Returns the span occupied by the snippet currently being edited.

public:
 virtual Microsoft::VisualStudio::TextManager::Interop::TextSpan GetExpansionSpan();
public:
 virtual Microsoft::VisualStudio::TextManager::Interop::TextSpan GetExpansionSpan();
 virtual Microsoft::VisualStudio::TextManager::Interop::TextSpan GetExpansionSpan();
public virtual Microsoft.VisualStudio.TextManager.Interop.TextSpan GetExpansionSpan ();
abstract member GetExpansionSpan : unit -> Microsoft.VisualStudio.TextManager.Interop.TextSpan
override this.GetExpansionSpan : unit -> Microsoft.VisualStudio.TextManager.Interop.TextSpan
Public Overridable Function GetExpansionSpan () As TextSpan

Returns

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.

Applies to