Click here to Skip to main content
15,885,141 members
Articles / Web Development / ASP.NET

Very Powerful, Generic, Irony Based, Database Searcher

Rate me:
Please Sign up or sign in to vote.
4.00/5 (6 votes)
26 Aug 2010Ms-PL8 min read 30.3K   546   29  
Usage of Irony to produce a Google-like search tool on any column in a database
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace searchComponent.interpreter
{
    /// <summary>
    /// This class represents a possible suggestion for the grammar in progress depending
    /// on the structure given.
    /// An object of this class ONLY contains the suggestion
    /// </summary>
    public class SuggestLine
    {
        /// <summary>
        /// Contains the value that should appear in the expression
        /// </summary>
        private string _value;

        /// <summary>
        /// Contains an explanatory text about the value
        /// </summary>
        private string _text;

        /// <summary>
        /// Contains the value that should appear in the expression
        /// </summary>
        public string Value
        {
            get { return this._value; }
        }

        /// <summary>
        /// Contains an explanatory text about the value
        /// </summary>
        public string Text
        {
            get { return this._text; }
        }

        /// <summary>
        /// Simple constructor for this object
        /// </summary>
        /// <param name="v"></param>
        /// <param name="t"></param>
        public SuggestLine(string v, string t)
        {
            this._text = t;
            this._value = v;
        }
    }
}

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.

License

This article, along with any associated source code and files, is licensed under The Microsoft Public License (Ms-PL)


Written By
Chief Technology Officer Artexacta
Bolivia Bolivia
just a coder. Love Java, but working on asp.net

Comments and Discussions