public override void Recalculate(int depth = 1) { foreach (var e in DependentOn) { e.UsedBy.Remove(this); } DependentOn.Clear(); _ignoreNotifyElementChanged = true; for (var i = 0; i < Exprs.Length; ++i) { if (Exprs[i] == null) { var e = new ScalarExpression(ObjectName, VarName + (i + 1), ExprsStrings[i], i, i == 0, this); Exprs[i] = e; _values[i] = e.CachedValue; } else { Exprs[i].AllowedToAddToParent = i == 0; Exprs[i].SetRawExpression(ExprsStrings[i]); } Exprs[i].AllowedToAddToParent = false; } _ignoreNotifyElementChanged = false; NotifyElementChanged(); }
public static ScalarExpression Add(ScalarExpression expr) { Data[expr.FullName] = expr; return(expr); }