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