RangeFactory
Helper class to instantiate IRange derived types, where strong typing is required underneath but the runtime type of IRange is not known
メソッド
NewRange(IComparable, IComparable) : IRange
Creates a new IRange instance of the same type as the min, max range with the specified Min and Max
- min
- The min value of the new range
- max
- The max value of the new range
戻り値: A new IRange derived instance of the same type as the input values
NewRange(Type, IComparable, IComparable) : IRange
Creates a new IRange instance of desired type, setting the min and max value
- rangeType
- Type of the range to create, e.g. IndexRange or DoubleRange.
- min
- The min value of the new range
- max
- The max value of the new range
戻り値: A new IRange derived instance of the same type as the input values
NewWithMinMax(IRange, IComparable, IComparable) : IRange
Creates a new IRange derived instance of the same type as originalRange with the specified Min and Max
- originalRange
- The original range to use as a reference
- min
- The min value of the new range
- max
- The max value of the new range
戻り値: A new IRange derived instance of the same type as originalRange
NewWithMinMax(IRange, double, double, IRange) : IRange
Creates a new IRange derived instance of the same type as originalRange with the specified Min and Max, with a Range Limit to clip min, max to.
- originalRange
- The original range to use as a reference
- min
- The min value of the new range
- max
- The max value of the new range
- rangeLimit
- The range limit to clip Min and Max to.
戻り値: A new IRange derived instance of the same type as originalRange