Compartir a través de


LanguageService.CreateExpansionProvider Method

Instantiates an ExpansionProvider class.

Namespace:  Microsoft.VisualStudio.Package
Assemblies:   Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
  Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
  Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.12.0 (in Microsoft.VisualStudio.Package.LanguageService.12.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)

Syntax

'Declaration
Public Overridable Function CreateExpansionProvider ( _
    src As Source _
) As ExpansionProvider
public virtual ExpansionProvider CreateExpansionProvider(
    Source src
)
public:
virtual ExpansionProvider^ CreateExpansionProvider(
    Source^ src
)
abstract CreateExpansionProvider : 
        src:Source -> ExpansionProvider  
override CreateExpansionProvider : 
        src:Source -> ExpansionProvider
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

Microsoft.VisualStudio.Package Namespace