ExpansionProvider.BeginTemplateEditing Method

Inserts the previously prepared code snippet and starts the snippet editing mode.

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 Sub BeginTemplateEditing ( _
    line As Integer, _
    col As Integer _
)
'用途
Dim instance As ExpansionProvider
Dim line As Integer
Dim col As Integer

instance.BeginTemplateEditing(line, col)
public virtual void BeginTemplateEditing(
    int line,
    int col
)
public:
virtual void BeginTemplateEditing(
    int line, 
    int col
)
abstract BeginTemplateEditing : 
        line:int * 
        col:int -> unit 
override BeginTemplateEditing : 
        line:int * 
        col:int -> unit 
public function BeginTemplateEditing(
    line : int, 
    col : int
)

Parameters

  • line
    Type: System.Int32
    [in] The line number where the insertion is to take place.
  • col
    Type: System.Int32
    [in] The character offset on the line where the insertion is to take place.

Remarks

The snippet to be inserted has been prepared by a call to the PrepareTemplate method.

The base method calls InsertNamedExpansion on the IVsExpansion object that was obtained from the IVsTextLines object in the ExpansionProvider class constructor (ExpansionProvider). If the insertion fails, the base method calls the EndTemplateEditing method. Otherwise, the snippet is inserted and the snippet editing mode is enabled (the latter two steps are done in the InsertNamedExpansion method on the IVsExpansion object when that method calls the OnBeforeInsertion method).

.NET Framework Security

See Also

Reference

ExpansionProvider Class

ExpansionProvider Members

Microsoft.VisualStudio.Package Namespace