LanguageService.CreateExpansionProvider Method (Source)


Instantiates an ExpansionProvider class.

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

public virtual ExpansionProvider CreateExpansionProvider(
	Source src


Type: Microsoft.VisualStudio.Package.Source

[in] The Source representing the source file.

Return Value

Type: Microsoft.VisualStudio.Package.ExpansionProvider

If successful, returns an ExpansionProvider object; otherwise, returns a null value.

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.

Return to top