ExpansionProvider.InsertSpecificExpansion(IVsTextView, XmlElement, TextSpan, String) Méthode

Définition

Insère l'extrait de code spécifique dans la source à la position spécifiée.

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

Paramètres

view
IVsTextView

[in] Objet IVsTextView représentant la vue affichant la source.

snippet
XmlElement

[in] Objet XmlElement contenant l'extrait de code à insérer.

pos
TextSpan

[in] Objet TextSpan spécifiant l'emplacement d'insertion de l'extrait de code.

relativePath
String

[in] Chemin d'accès relatif au fichier modèle d'extrait de code d'où est issu cet extrait de code.

Retours

Boolean

Si l'extrait de code a été inséré, retourne True ; sinon, retourne False.

Remarques

La méthode de base convertit l' XmlElement objet en objet IXMLDOMNode , puis appelle la InsertSpecificExpansion méthode sur l' IVsExpansion objet. Si la InsertSpecificExpansion méthode réussit, la méthode de base enregistre l' IVsExpansionSession objet qui a été retourné et retourne la valeur true ; sinon, la méthode de base retourne false.

S’applique à