IVsExpansionSession.GetSnippetNode Method

Returns a node from the code snippet <Snippet> tag.

Namespace:  Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop.8.0 (in Microsoft.VisualStudio.TextManager.Interop.8.0.dll)

Syntax

'Declaration
Function GetSnippetNode ( _
    bstrNode As String, _
    <OutAttribute> ByRef pNode As IXMLDOMNode _
) As Integer
'Usage
Dim instance As IVsExpansionSession 
Dim bstrNode As String 
Dim pNode As IXMLDOMNode 
Dim returnValue As Integer 

returnValue = instance.GetSnippetNode(bstrNode, _
    pNode)
int GetSnippetNode(
    string bstrNode,
    out IXMLDOMNode pNode
)
int GetSnippetNode(
    [InAttribute] String^ bstrNode, 
    [OutAttribute] IXMLDOMNode^% pNode
)
function GetSnippetNode(
    bstrNode : String, 
    pNode : IXMLDOMNode
) : int

Parameters

  • bstrNode
    Type: System.String

    [in] A string containing the name of the XML tag to look for. This can be a nulla null reference (Nothing in Visual Basic) value. See Remarks.

  • pNode
    Type: IXMLDOMNode%

    [out] Returns an appendChild object representing the specified tag.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From textmgr2.idl:

HRESULT IVsExpansionSession::GetSnippetNode(
   [in] BSTR bstrNode,
   [out] IXMLDOMNode **pNode
);

This method provides access to the snippet node of the code snippet that contains information about the fields as well, imports, references, as well as the code to be inserted. See Snippet Element (IntelliSense Code Snippets) for details on what tags can be searched for.

If the bstrNode parameter is a nulla null reference (Nothing in Visual Basic) value, this method returns the node of the <Snippet> tag itself. If the bstrNode parameter is not a nulla null reference (Nothing in Visual Basic) value, this method searches the tags in the <Snippet> tag node for the specified tag. Note that this search is only for the nodes one level below the <Snippet> tag and no further.

.NET Framework Security

See Also

Reference

IVsExpansionSession Interface

IVsExpansionSession Members

Microsoft.VisualStudio.TextManager.Interop Namespace

Other Resources

Snippet Element (IntelliSense Code Snippets)