ExpansionProvider.OnItemChosen(String, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Called when an item is chosen in a snippet browser.
public:
virtual int OnItemChosen(System::String ^ pszTitle, System::String ^ pszPath);
public:
virtual int OnItemChosen(Platform::String ^ pszTitle, Platform::String ^ pszPath);
virtual int OnItemChosen(std::wstring const & pszTitle, std::wstring const & pszPath);
public virtual int OnItemChosen (string pszTitle, string pszPath);
abstract member OnItemChosen : string * string -> int
override this.OnItemChosen : string * string -> int
Public Overridable Function OnItemChosen (pszTitle As String, pszPath As String) As Integer
Parameters
- pszTitle
- String
[in] A string containing the name of the snippet that was selected.
- pszPath
- String
[in] A string containing the path to the snippet template file.
Returns
If successful, returns S_OK; otherwise, returns an error code.
Implements
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.