public override string ToString() { string start = Lower.ToString(); string end = Upper.ToString(); return(string.Concat(start, " - ", end)); }
private TraceId(ulong lower) { _isDataDogCompatible = true; Higher = 0; Lower = (long)lower; _string = Lower.ToString(CultureInfo.InvariantCulture); }
public string GetText() { if (Total == 0) { return(string.Join("\t", Enumerable.Repeat("", 5))); } return(Lower.ToString("P2") + "\t" + Middle.ToString("P2") + "\t" + Upper.ToString("P2") + "\t" + Num + "\t" + Total); }
public override void SyncGestalt() { string newGestalt = string.Empty; if (false == Double.IsNaN(Lower)) { newGestalt += Lower.ToString(); if (false == string.IsNullOrEmpty(Units)) { newGestalt += Units; } if (LowerInclusive) { newGestalt += " <= "; } else { newGestalt += " < "; } } if (false == Double.IsNaN(Target)) { newGestalt += "[" + Target.ToString(); if (false == string.IsNullOrEmpty(Units)) { newGestalt += Units; } newGestalt += "]"; } if (false == Double.IsNaN(Upper)) { if (UpperInclusive) { newGestalt += " <= "; } else { newGestalt += " < "; } newGestalt += Upper.ToString(); if (false == string.IsNullOrEmpty(Units)) { newGestalt += Units; } } SetPropRowValue(CswEnumNbtSubFieldName.Gestalt, CswEnumNbtPropColumn.Gestalt, newGestalt); }
private string CreateViolationReportUsingValues(double d) { if (Lower.HasValue && Upper.HasValue) { return(BetweenMessage(d, Lower.ToString(), Upper.ToString())); } if (Lower.HasValue) { return(GreaterThanMessage(d, Lower.ToString())); } if (Upper.HasValue) { return(LessThanMessage(d, Upper.ToString())); } throw new InvalidOperationException("Illegal state."); }
public string ToString(string format, IFormatProvider formatProvider = null, bool showLevel = true) { formatProvider ??= DefaultCultureInfo.Instance; var builder = new StringBuilder(); builder.Append('['); builder.Append(Lower.ToString(format, formatProvider)); builder.Append("; "); builder.Append(Upper.ToString(format, formatProvider)); builder.Append("]"); if (showLevel) { builder.Append(" (CI "); builder.Append(ConfidenceLevel.ToString()); builder.Append(")"); } return(builder.ToString()); }
public override string ToString() { string lower = "null"; string upper = "null"; string edit = "null"; if (Edit != null) { edit = Edit.ToString(); } if (Lower != null) { lower = Lower.ToString(); } if (Upper != null) { upper = Upper.ToString(); } return($"{lower} | {edit} | {upper}"); }
private Z3Expr MkCoercion(Z3Expr t, AppFreeCanUnn unn, RealEmbedding te) { return(BoxingFun.Apply( ((Z3IntExpr)Context.MkSub(Context.MkReal2Int((Z3RealExpr)t), Context.MkInt(Lower.ToString()))).Int2BV(Context, bvSort.Size))); }
public override void ToJSON(JObject ParentObject) { ParentObject[_LowerSubField.ToXmlNodeName(true)] = (!Double.IsNaN(Lower)) ? Lower.ToString() : string.Empty; ParentObject[_TargetSubField.ToXmlNodeName(true)] = (!Double.IsNaN(Target)) ? Target.ToString() : string.Empty; ParentObject[_UpperSubField.ToXmlNodeName(true)] = (!Double.IsNaN(Upper)) ? Upper.ToString() : string.Empty; ParentObject[_LowerInclusiveSubField.ToXmlNodeName(true)] = LowerInclusive; ParentObject[_UpperInclusiveSubField.ToXmlNodeName(true)] = UpperInclusive; ParentObject[_UnitsSubField.ToXmlNodeName(true)] = Units; ParentObject["minvalue"] = MinValue.ToString(); ParentObject["maxvalue"] = MaxValue.ToString(); ParentObject["precision"] = Precision; ParentObject["excludeRangeLimits"] = ExcludeRangeLimits; }
/// <summary> /// Returns a string that represents the current object. /// </summary> /// <returns> /// A string that represents the current object. /// </returns> public string ToString(int precision) { return("[" + Lower.ToString("F" + precision) + ", " + Upper.ToString("F" + precision) + "]"); }