Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ExpansionProvider.OnItemChosen Method

Called when an item is chosen in a snippet browser.

Namespace:  Microsoft.VisualStudio.Package
Assemblies:   Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.12.0 (in Microsoft.VisualStudio.Package.LanguageService.12.0.dll)
  Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
  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)

public virtual int OnItemChosen(
	string pszTitle,
	string pszPath
)

Parameters

pszTitle
Type: String

[in] A string containing the name of the snippet that was selected.

pszPath
Type: String

[in] A string containing the path to the snippet template file.

Return Value

Type: Int32
If successful, returns S_OK; otherwise, returns an error code.

Implements

IVsExpansionClient.OnItemChosen(String, String)

This method is an implementation of the OnItemChosen method on the IVsExpansionClient interface.

The base method gets the current caret position from the IVsTextView object passed to the InsertSpecificExpansion or InsertNamedExpansion methods and then calls the InsertNamedExpansion method on the IVsExpansionClient object, returning the success code from that call to the InsertNamedExpansion method.

Show:
© 2015 Microsoft