次の方法で共有


IVsFindScope Interface

Definition

Defines a custom scope that can be chosen in the Find in Files, Look in combo box.

public interface class IVsFindScope
public interface class IVsFindScope
__interface IVsFindScope
[System.Runtime.InteropServices.Guid("0FE9496A-129C-40EE-99D8-7705A6283518")]
[System.Runtime.InteropServices.InterfaceType(1)]
public interface IVsFindScope
[System.Runtime.InteropServices.Guid("0FE9496A-129C-40EE-99D8-7705A6283518")]
[System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
public interface IVsFindScope
[<System.Runtime.InteropServices.Guid("0FE9496A-129C-40EE-99D8-7705A6283518")>]
[<System.Runtime.InteropServices.InterfaceType(1)>]
type IVsFindScope = interface
[<System.Runtime.InteropServices.Guid("0FE9496A-129C-40EE-99D8-7705A6283518")>]
[<System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)>]
type IVsFindScope = interface
Public Interface IVsFindScope
Attributes

Remarks

Implemented by packages that want to extend the scopes available for Find in Files. Your custom scope must be registered with the environment using the shell's IVsRegisterFindScope service. A scope can be either a simple find-in-files query string or a filename enumerator. A query string is what the user can type in the 'Look in' combo:

  • It takes the form of a semicolon-delimited list of folders and filenames.

  • Individual items on the list may be quoted.

  • The 'Look in subfolders' check box applies to the query.

  • The filters selected in the 'File types' combo box apply to the query.

There is no mechanism to override the user's subfolders selection. If you need greater control over recursive file enumeration, you must provide a filename enumerator.

To execute a Find, the Find manager asks first for a query string, and if that fails, it asks for a string enumerator that is expected to return a sequence of filenames. A scope should implement GetQuery or EnumFilenames; never both. The user's 'File types' extension filters are applied to all types of scopes.

Methods

EnumFilenames(IEnumString)

Enumerate filenames (full path only).

GetQuery(String, String)

Returns a query string

GetUIName(String)

Returns the name displayed in Find UI

Applies to