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