ExpansionProvider.InsertSpecificExpansion Method

Definition

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

public:
 virtual bool InsertSpecificExpansion(Microsoft::VisualStudio::TextManager::Interop::IVsTextView ^ view, System::Xml::XmlElement ^ snippet, Microsoft::VisualStudio::TextManager::Interop::TextSpan pos, System::String ^ relativePath);
public virtual bool InsertSpecificExpansion (Microsoft.VisualStudio.TextManager.Interop.IVsTextView view, System.Xml.XmlElement snippet, Microsoft.VisualStudio.TextManager.Interop.TextSpan pos, string relativePath);
abstract member InsertSpecificExpansion : Microsoft.VisualStudio.TextManager.Interop.IVsTextView * System.Xml.XmlElement * Microsoft.VisualStudio.TextManager.Interop.TextSpan * string -> bool
override this.InsertSpecificExpansion : Microsoft.VisualStudio.TextManager.Interop.IVsTextView * System.Xml.XmlElement * Microsoft.VisualStudio.TextManager.Interop.TextSpan * string -> bool
Public Overridable Function InsertSpecificExpansion (view As IVsTextView, snippet As XmlElement, pos As TextSpan, relativePath As String) As Boolean

Parameters

view
IVsTextView

[in] An IVsTextView object representing the view showing the source.

snippet
XmlElement

[in] An XmlElement object containing the snippet to insert.

pos
TextSpan

[in] A TextSpan object specifying the position where the snippet is to be inserted.

relativePath
String

[in] A relative path to the snippet template file from which this snippet was taken.

Returns

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.

Applies to