changeset 59:c6ed77f263a6

Re #24: Add limit objects * Add default constructor that doesn't set a limit (so it always returns whatever is passed to GetLimit())
author IBBoard <dev@ibboard.co.uk>
date Sat, 24 Oct 2009 19:49:47 +0000
parents 8290adbbc7c4
children 0e64a120785f
files Limits/NumericSizeConstrainedLimit.cs
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Limits/NumericSizeConstrainedLimit.cs	Sat Oct 24 15:44:40 2009 +0000
+++ b/Limits/NumericSizeConstrainedLimit.cs	Sat Oct 24 19:49:47 2009 +0000
@@ -10,7 +10,14 @@
 	/// A limit of a specified number, or the number it is limited against, whichever is smaller.
 	/// </summary>
 	public class NumericSizeConstrainedLimit : AbstractLimit, INumericLimit
-	{		
+	{
+		/// <summary>
+		/// Default constructor that will always return the constrained number, no matter what size it is
+		/// </summary>
+		public NumericSizeConstrainedLimit() : this(int.MaxValue)
+		{			
+		}
+		
 		public NumericSizeConstrainedLimit (int numericLimit) : base(numericLimit)
 		{
 		}