Click here to Skip to main content
12,758,605 members (32,406 online)
Click here to Skip to main content
Articles » Languages » C# » General » Downloads


47 bookmarked
Posted 1 May 2007

LINQ To Google Image and Google Groups

, 8 May 2007
A LINQ Implementation for Google Images/Groups Search
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MChen.Linq.GoogleSearch.Common
    public abstract class Result
        public int Rank { get; internal set; }
        public Uri Url { get; internal set; }
        public string Domain { get; internal set; }
        public string Description { get; internal set; }

    internal abstract class QueryInfo
        public List<string> AllWords = new List<string>();
        public List<string> OrWords = new List<string>();
        public List<string> NotWords = new List<string>();

        public string Domain { get; set; }

        #region private methods
        protected string GetDomain()
            if (Domain == null) return "";
            return Domain;

        protected string GetWords(List<string> list)
            StringBuilder sb = new StringBuilder();
            foreach (string s in list)
                sb.AppendFormat("{0} ", s);
            return sb.ToString();

        public abstract string GetUrl(int start);

        public override string ToString()
            StringBuilder sb = new StringBuilder();
            sb.Append("All:         ");
            foreach (string s in AllWords) sb.AppendFormat("{0}, ", s);
            sb.Append("Or:          ");
            foreach (string s in OrWords) sb.AppendFormat("{0}, ", s);
            sb.Append("Not:         ");
            foreach (string s in NotWords) sb.AppendFormat("{0}, ", s);
            sb.AppendFormat("Domian:      {0}\n", Domain);
            return sb.ToString();

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Web Developer
United States United States
<a href=>Read My Blog

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170217.1 | Last Updated 8 May 2007
Article Copyright 2007 by Ming.Chen
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid