IVsWindowSearchCustomFilter.ApplyFilter(String, Int32, Int32) Method

Definition

Filters the current search string.

C#
public void ApplyFilter(out string pbstrSearchString, out int piSelectionStart, out int piSelectionEnd);

Parameters

pbstrSearchString
String

[in, out] The current search string to be filtered. Returns a string modified by the filtering action.

piSelectionStart
Int32

[in, out] The position in the string to start filtering (0 indicates the first character in the string). Returns the starting position of the filtered string.

piSelectionEnd
Int32

[in, out] The position in the string to stop filtering (-1 indicates the last character in the string). Returns the stopping position of the filtered string.

Remarks

This method applies the filter to the current search string, returning the result and a selection interval delimiting the string that should be displayed. Use -1 to indicate string end, [0,-1] to select the whole string, and so on.

For example, you could append text like “Filter:(<parameter>)” if no text is selected and return a selection for the “<parameter>” string for easy replacement. You could also insert text around the selected text like “Filter:(<existing_selection>)”.

Applies to

Proizvod Verzije
Visual Studio SDK 2015, 2017, 2019, 2022