IVsExpansionFunction Interface

Represents an expansion function in a code snippet.

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

Syntax

声明
<InterfaceTypeAttribute()> _
<GuidAttribute("563011A2-1611-48ED-B3B1-189060064F66")> _
Public Interface IVsExpansionFunction
用法
Dim instance As IVsExpansionFunction
[InterfaceTypeAttribute()]
[GuidAttribute("563011A2-1611-48ED-B3B1-189060064F66")]
public interface IVsExpansionFunction
[InterfaceTypeAttribute()]
[GuidAttribute(L"563011A2-1611-48ED-B3B1-189060064F66")]
public interface class IVsExpansionFunction
[<InterfaceTypeAttribute()>]
[<GuidAttribute("563011A2-1611-48ED-B3B1-189060064F66")>]
type IVsExpansionFunction =  interface end
public interface IVsExpansionFunction

Remarks

An expansion function in a code snippet is a function name associated with a particular field that represents a single value or a list of values (which is presented in an IntelliSense completion list). See Function Element (IntelliSense Code Snippets) for details on how expansion functions are declared in a code snippet file.

The function name obtaisn an expansion function object as represented by the IVsExpansionFunction interface from a language service. That IVsExpansionFunction object is then asked for the value or values to be presented in the field when the code snippet is inserted. This gives for dynamically generated values based on the context in which the code snippet is inserted.

备注

An expansion function represents either a single value or a list of values but it cannot represent both.

Notes to Implementers

A language service implements this interface to represent an expansion function. For each distinct expansion function supported, the language service must return a unique implementation of this interface. For example, if the language service supports two expansion functions, say, GetLocalName and GetNextClassName, it must implement a separate class to the IVsExpansionFunction interface for each expansion function. Then, the language service must return an instance of each class for each expansion function.

Notes to Callers

An IVsExpansionFunction object is returned from the GetExpansionFunction method in the IVsExpansionClient interface.

See Also

Reference

IVsExpansionFunction Members

Microsoft.VisualStudio.TextManager.Interop Namespace

Other Resources

Function Element (IntelliSense Code Snippets)