Compartilhar via


ExpansionProvider.InsertSpecificExpansion Method

Inserts the specific snippet into the source at the specified position.

Namespace:  Microsoft.VisualStudio.Package
Assemblies:   Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
  Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
  Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)

Syntax

'Declaração
Public Overridable Function InsertSpecificExpansion ( _
    view As IVsTextView, _
    snippet As XmlElement, _
    pos As TextSpan, _
    relativePath As String _
) As Boolean
public virtual bool InsertSpecificExpansion(
    IVsTextView view,
    XmlElement snippet,
    TextSpan pos,
    string relativePath
)

Parameters

  • relativePath
    Type: System.String
    [in] A relative path to the snippet template file from which this snippet was taken.

Return Value

Type: System.Boolean
If the snippet was inserted, returns true; otherwise, returns false.

Remarks

The base method converts the XmlElement object to an IXMLDOMNode object and then calls the InsertSpecificExpansion method on the IVsExpansion object. If the InsertSpecificExpansion method is successful, the base method saves the IVsExpansionSession object that was returned and returns true; otherwise, the base method returns false.

.NET Framework Security

See Also

Reference

ExpansionProvider Class

Microsoft.VisualStudio.Package Namespace