Line data Source code
1 : using System;
2 :
3 : namespace Cqrs.Entities
4 : {
5 : /// <summary>
6 : /// A range object for collecting a lower and upper limit, such as a number or date range.
7 : /// </summary>
8 : public class Range<TPrimitive>
9 : where TPrimitive : struct
10 1 : {
11 : /// <summary>
12 : /// The lower limit such as a from <see cref="DateTime"/>.
13 : /// </summary>
14 : public TPrimitive? From { get; set; }
15 :
16 : /// <summary>
17 : /// The upper limit such as a to <see cref="DateTime"/>.
18 : /// </summary>
19 : public TPrimitive? To { get; set; }
20 :
21 : /// <summary>
22 : /// Is the value of <see cref="From"/> inclusive or not. Defaults to true.
23 : /// </summary>
24 : public bool IsFromInclusive { get; set; }
25 :
26 : /// <summary>
27 : /// Is the value of <see cref="To"/> inclusive or not. Defaults to true.
28 : /// </summary>
29 : public bool IsToInclusive { get; set; }
30 : }
31 : }
|