Share via


LanguageService.CreateExpansionProvider Method

Instantiates an ExpansionProvider class.

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

Syntax

'Declaration
Public Overridable Function CreateExpansionProvider ( _
    src As Source _
) As ExpansionProvider
'Usage
Dim instance As LanguageService 
Dim src As Source 
Dim returnValue As ExpansionProvider 

returnValue = instance.CreateExpansionProvider(src)
public virtual ExpansionProvider CreateExpansionProvider(
    Source src
)
public:
virtual ExpansionProvider^ CreateExpansionProvider(
    Source^ src
)
public function CreateExpansionProvider(
    src : Source
) : ExpansionProvider

Parameters

Return Value

Type: Microsoft.VisualStudio.Package.ExpansionProvider
If successful, returns an ExpansionProvider object; otherwise, returns a null value.

Remarks

An expansion provider supports code snippets that are expanded into the source file. A snippet can contain zero or more fields that are filled in based on context, an expansion function, or a value that is embedded in the snippet template. An expansion provider not only handles the expansion process of the template into the source code, but it also handles editing the template in place.

The base method always returns a new ExpansionProvider object.

.NET Framework Security

See Also

Reference

LanguageService Class

LanguageService Members

Microsoft.VisualStudio.Package Namespace