PageRenderTime 72ms CodeModel.GetById 41ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 15ms

/src/LinFu.Finders/Interfaces/IFuzzyItem.cs

http://github.com/philiplaureano/LinFu
C# | 38 lines | 10 code | 3 blank | 25 comment | 0 complexity | e7710581535080bd7d4c6bf5956c071d MD5 | raw file
 1namespace LinFu.Finders.Interfaces
 2{
 3    /// <summary>
 4    ///     Represents a search item in a fuzzy search list.
 5    /// </summary>
 6    /// <typeparam name="T"></typeparam>
 7    public interface IFuzzyItem<T>
 8    {
 9        /// <summary>
10        ///     Reports the probability of a match
11        ///     based on the <see cref="ICriteria{T}" />
12        ///     that has been tested so far.
13        ///     A value of 1.0 indicates a 100% match;
14        ///     A value of 0.0 equals a zero percent match.
15        /// </summary>
16        double Confidence { get; }
17
18        /// <summary>
19        ///     Gets the target item.
20        /// </summary>
21        T Item { get; }
22
23        /// <summary>
24        ///     Tests if the current item matches the given
25        ///     <paramref name="criteria" />.
26        /// </summary>
27        /// <param name="criteria">
28        ///     The <see cref="ICriteria{T}" /> that determines whether or not the <see cref="Item" /> meets a
29        ///     particular description.
30        /// </param>
31        void Test(ICriteria<T> criteria);
32
33        /// <summary>
34        ///     Resets the item back to its initial state.
35        /// </summary>
36        void Reset();
37    }
38}