Compartir a través de


LanguageService.CreateExpansionProvider(Source) Method

Definition

Instantiates an ExpansionProvider class.

public:
 virtual Microsoft::VisualStudio::Package::ExpansionProvider ^ CreateExpansionProvider(Microsoft::VisualStudio::Package::Source ^ src);
public virtual Microsoft.VisualStudio.Package.ExpansionProvider CreateExpansionProvider (Microsoft.VisualStudio.Package.Source src);
abstract member CreateExpansionProvider : Microsoft.VisualStudio.Package.Source -> Microsoft.VisualStudio.Package.ExpansionProvider
override this.CreateExpansionProvider : Microsoft.VisualStudio.Package.Source -> Microsoft.VisualStudio.Package.ExpansionProvider
Public Overridable Function CreateExpansionProvider (src As Source) As ExpansionProvider

Parameters

src
Source

[in] The Source representing the source file.

Returns

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.

Applies to