ExpansionProvider.OnItemChosen Method
Called when an item is chosen in a snippet browser.
Namespace: Microsoft.VisualStudio.Package
Assemblies: Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.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.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)
Syntax
'Declaration
Public Overridable Function OnItemChosen ( _
pszTitle As String, _
pszPath As String _
) As Integer
public virtual int OnItemChosen(
string pszTitle,
string pszPath
)
Parameters
- pszTitle
Type: System.String
[in] A string containing the name of the snippet that was selected.
- pszPath
Type: System.String
[in] A string containing the path to the snippet template file.
Return Value
Type: System.Int32
If successful, returns S_OK; otherwise, returns an error code.
Implements
IVsExpansionClient.OnItemChosen(String, String)
Remarks
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.
.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.