I just updated the Reflector.PowerCommands project with the latest minor release.
This release adds Import/Export capability to the Query Editor.
To Export a Query
Export works with the currently loaded query. So you will need to either open an existing query first or type one … otherwise the export the query information and an empty query text.
When you have the query you want to export open
1. Click the export button and the Export Query dialog will show (below)
2. Edit the query information you want to export and click OK.
3. Then the Save As dialog will show, give the export file a name and click Save.
To Import a Query
1. Click the import button and the Open File dialog will open
2. Find the xml file with the exported query in it and click Open
The Query will be added to you local cache.
If you want to try an import, you can use this one:
http://jasonhaley.com/files/InstantiatedByFilterByNamespace.xml
It is a query I wrote for someone in the Reflector forum to search through a given namespace for methods that instantiate a specific type … basically a filtered “InstantiatedBy” that the Analyze functionality in Reflector already does. The example uses the namespace of “System.Net” and searches for methods that use “System.IO.Stream” and writes it to the output window.