public PartitionFunction(string name, string inputParameterType, RangeKind range) { Name = name; InputParameterType = inputParameterType; Range = range; BoundaryValues = new List <string>(); }
public PartitionFunction(string name, string inputParameterType, RangeKind range, int inputParameterLength, byte inputParameterPrecision, int inputParameterScale) : this(name, inputParameterType, range) { InputParameterLength = inputParameterLength; InputParameterPrecision = inputParameterPrecision; InputParameterScale = inputParameterScale; }
public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) { if ((value == null)) { return(null); } RangeKind valueCasted = ((RangeKind)(value)); if ((valueCasted == RangeKind.Normal)) { return("normal"); } if ((valueCasted == RangeKind.High)) { return("high"); } if ((valueCasted == RangeKind.Low)) { return("low"); } if ((valueCasted == RangeKind.HighHigh)) { return("highHigh"); } if ((valueCasted == RangeKind.LowLow)) { return("lowLow"); } throw new ArgumentOutOfRangeException("value"); }
private void UpdateRangeButton(RangeKind rangeKind, string buttonName) { var value = _currentValue.GetRangeValue(rangeKind); var text = string.Format("{0} {1}", "\u00B1", _formatValue(value)); SetUiComponentText(text, buttonName); }
internal NumericRangeResolution(ResolutionKind resolutionKind, RangeKind rangeKind, double minimum, double maximum) : base(resolutionKind) { RangeKind = rangeKind; Minimum = minimum; Maximum = maximum; ResolutionKind = resolutionKind; }
internal NumericRangeResolution(RangeKind rangeKind, double minimum, double maximum) { RangeKind = rangeKind; Minimum = minimum; Maximum = maximum; ResolutionKind = ResolutionKind.NumericRange; }
public static T IsInRange <T>(T from, T to, RangeKind kind) where T : IComparable { return(ProfilerInterceptor.GuardInternal(() => { MockingContext.CurrentRepository.AddMatcherInContext(new RangeMatcher <T>(from, to, kind)); return default(T); })); }
/// <summary> /// Sets Min and Max properties according to given range type and current value /// </summary> /// <param name="rangeKind">The type of range</param> public void SetRange(RangeKind rangeKind) { var rangeValue = _ranges[rangeKind]; Min = Minus(Value, rangeValue); Max = Plus(Value, rangeValue); // check if we are outside the (DefaultMin, DefaultMax) if (Min.CompareTo(DefaultMin) < 0) { Min = DefaultMin; } if (Max.CompareTo(DefaultMax) > 0) { Max = DefaultMax; } }
public RangeMatcher(T from, T to, RangeKind kind) { this.from = from; this.to = to; this.kind = kind; }
public static T Create(T from, T to, RangeKind kind) { throw new NotSupportedException(); }
/// <summary> /// Adds a range to the maintained ranges. /// </summary> /// <param name="rangeKind">The kind of range</param> /// <param name="rangeValue">The value of range</param> public void AddRange(RangeKind rangeKind, T rangeValue) { _ranges.Add(rangeKind, rangeValue); }
/// <summary> /// Gets the value of given range /// </summary> /// <param name="rangeKind">The range</param> /// <returns></returns> public T GetRangeValue(RangeKind rangeKind) { return(_ranges[rangeKind]); }