ExpansionProvider::InsertSpecificExpansion Method (IVsTextView^, XmlElement^, TextSpan, String^)

 

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

Namespace:   Microsoft.VisualStudio.Package
Assembly:  Microsoft.VisualStudio.Package.LanguageService.14.0 (in Microsoft.VisualStudio.Package.LanguageService.14.0.dll)

public:
virtual bool InsertSpecificExpansion(
	IVsTextView^ view,
	XmlElement^ snippet,
	TextSpan pos,
	String^ relativePath
)

Parameters

view
Type: Microsoft.VisualStudio.TextManager.Interop::IVsTextView^

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

snippet
Type: System.Xml::XmlElement^

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

pos
Type: Microsoft.VisualStudio.TextManager.Interop::TextSpan

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

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.

The base method converts the XmlElement object to an 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.dd001f09-8d9b-477a-9d71-b86ad99bf444

Return to top
Show: