Project Description

The main goal of this project is create a LinQ extension to interact with the new functionality of desktop search using de advantages of the elegant and efficient programming model introduced by C# 3.0

For more information about the desktop search API please visit the official site : http://msdn2.microsoft.com/en-us/library/aa965362.aspx

Features

  1. Support for the following shell objects: Audio,Computer,Core,Digital Rights Management,Document,Image,Link,Music,Note,Shell,Software. Refer to http://msdn2.microsoft.com/en-us/library/ms788673.aspx for more information about shell objects
  2. Support for Take, TakeWhile, Skip, SkipWhile, First , FirstOrDefault query operators
  3. Suppor for string functions : Contains, StartWidth, EndWidth
  4. Support for remote machine query (example: SELECT SystemIndex.ItemName FROM machinename.SystemIndex)
  5. Suppor for debugger visualizer.
  6. Support for lazy object materialization

Samples of use

Simple

       //Select all items in system search an get a projection of unknown type with the following properties: 
         //                string ItemName, string Author, string[] Kind, Music Music, string language

          SystemIndex<SystemSearch> si = new SystemIndex<SystemSearch>();
         
            var result = (from SystemSearch t in si
                             select new { t.ItemName, t.Author, t.Kind, t.Music, t.Language });

Using WHERE

         //Select all folders or documents where ItemName contains "esk"

           SystemIndex<SystemSearch> si = new SystemIndex<SystemSearch>();
         
            var result = (from SystemSearch t in si
                                 where (t.Kind == new string[] { "document" } ||  t.Kind == new string[] { "Folder" }  )  &&  t.ItemName.Contains("esk")
                                 select new { t.ItemName, t.Author, t.Kind, t.Music, t.Language });

Using Order By

         //Select all folders or documents where ItemName contains "esk" ordered by Kind

           SystemIndex<SystemSearch> si = new SystemIndex<SystemSearch>();
         
            var result =   (from SystemSearch t in si
                                 where (t.Kind == new string[] { "document" } ||  t.Kind == new string[] { "Folder" }  )  &&  t.ItemName.Contains("esk")
                                 orderby t.Kind
                                 select new { t.ItemName, t.Author, t.Kind, t.Music, t.Language });



Last edited Aug 10, 2007 at 3:00 PM by marior, version 22