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.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
Syntax
'Déclaration
Public Overridable Function CreateExpansionProvider ( _
src As Source _
) As ExpansionProvider
'Utilisation
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
)
abstract CreateExpansionProvider :
src:Source -> ExpansionProvider
override CreateExpansionProvider :
src:Source -> ExpansionProvider
public function CreateExpansionProvider(
src : Source
) : ExpansionProvider
Parameters
- 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.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.