Posts for #C#

As I mentioned in a previous post, Copernic Desktop Search 1.5 beta is currently available to the public. One of the most important new features was for me the introduction of an extensibility API. When I wrote that first announcement, I hadn’t had a close look at the API. By now I’ve found out that it’s about extracting data from new file types, nothing more or less than that. I’d wish, and maybe I should add that to my list of things I’d like to see in CDS, they would extend that extensibility support to other areas, like creating plugins for file type preview, or even introducing completely new ranges of searchable objects. Well, maybe that’s in the future. For now, I’ve taken the plunge and tried to implement a custom extractor for CDS. And while I was at it, I wanted to do it in in C#. I succeeded and these are the results, maybe somebody will find this useful to implement a custom extractor that really does something worthwhile 😃

The interface

In this post, Dave Templin explains the purpose of the .vshost.exe that gets created automatically by Visual Studio Whidbey. What it also mentions is the fact that the application domain my code runs in is of course different when I run in the debugger. I found a problem with this where the FriendlyName is concerned. I’ve been using the FriendlyName to construct names based on my application’s exe name, the same way the normal app.config files work. The problem is, as soon as I run the app in the debugger, the FriendlyName is no longer the same and the config file that’s already there isn’t found.

To solve this, I was looking for a way to find out the “real” base name of my application’s exe file, without the vshost. part. Apparently, there’s no special property or anything that would let me access this information directly… maybe that would be a useful extension to the System.Diagnostics.Debugger class.

A very interesting article here: Comparisons with Generics