/src/LinFu.Finders/Interfaces/ICriteria.cs
http://github.com/philiplaureano/LinFu · C# · 29 lines · 10 code · 3 blank · 16 comment · 0 complexity · 3269fbbe94e051fdb5a75fc1c3c518b8 MD5 · raw file
- using System;
- namespace LinFu.Finders.Interfaces
- {
- /// <summary>
- /// Represents a class that describes the search criteria
- /// for a given item <typeparamref name="T">type</typeparamref>.
- /// </summary>
- /// <typeparam name="T">The target item type.</typeparam>
- public interface ICriteria<T>
- {
- /// <summary>
- /// Gets or sets a value indicating the <see cref="CriteriaType" />
- /// of the current <see cref="ICriteria{T}" />.
- /// </summary>
- CriteriaType Type { get; set; }
- /// <summary>
- /// The condition that will determine whether or not
- /// the target item matches the criteria.
- /// </summary>
- Func<T, bool> Predicate { get; }
- /// <summary>
- /// Gets or sets a value indicating the weight of the given <see cref="Predicate" />.
- /// </summary>
- int Weight { get; set; }
- }
- }