53
|
1 // This file (UnlimitedLimit.cs) is a part of the IBBoard project and is copyright 2009 IBBoard
|
|
2 //
|
|
3 // The file and the library/program it is in are licensed under the GNU LGPL license, either version 3 of the License or (at your option) any later version. Please see COPYING.LGPL for more information and the full license.
|
|
4
|
|
5 using System;
|
|
6
|
|
7 namespace IBBoard.Limits
|
|
8 {
|
|
9 /// <summary>
|
55
|
10 /// A special case "infinite" limit that always returns the integer number closest to infinity.
|
53
|
11 /// </summary>
|
57
|
12 public class UnlimitedLimit : AbstractLimit, INumericLimit
|
53
|
13 {
|
|
14 public UnlimitedLimit () : base(double.PositiveInfinity)
|
|
15 {
|
|
16 }
|
|
17
|
|
18 public override int GetLimit (int size)
|
|
19 {
|
55
|
20 return int.MaxValue;
|
53
|
21 }
|
|
22 }
|
|
23 }
|