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
'Declaration
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
)
public:
virtual bool InsertSpecificExpansion(
IVsTextView^ view,
XmlElement^ snippet,
TextSpan pos,
String^ relativePath
)
abstract InsertSpecificExpansion :
view:IVsTextView *
snippet:XmlElement *
pos:TextSpan *
relativePath:string -> bool
override InsertSpecificExpansion :
view:IVsTextView *
snippet:XmlElement *
pos:TextSpan *
relativePath:string -> bool
public function InsertSpecificExpansion(
view : IVsTextView,
snippet : XmlElement,
pos : TextSpan,
relativePath : String
) : boolean
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.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.