-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCriteria.cs
38 lines (35 loc) · 1.01 KB
/
Criteria.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
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;
}
}
}