public override string ToString()
        {
            LowerValue.UpdateWhenValueChanged();
            HigherValue.UpdateWhenValueChanged();

            var value = GetShownValue();


            return($"{value} {this.Unit}");
        }
Example #2
0
        public override Expression CreateExpression(object context)
        {
            var result = Expression.NewArrayInit
                         (
                typeof(string),
                new Expression[]
            {
                Expression.Constant(LowerValue.Trim('"')),
                Expression.Constant(UpperValue.Trim('"'))
            }
                         );

            return(result);

            //return null;
        }
Example #3
0
 private string GetDebuggerDisplay()
 {
     return(Date.ToShortDateString() + " " + LowerValue.ToString("N4") + " " + UpperValue.ToString("N4"));
 }
Example #4
0
 /// <summary>
 /// See base docs. Do not use these objects as keys!
 /// </summary>
 /// <returns></returns>
 public override int GetHashCode()
 {
     unchecked {
         return((base.GetHashCode() << 16) | (LowerValue.GetHashCode() << 8) | UpperValue.GetHashCode());
     }
 }