/// <summary> /// Checks whether a tree has a fiction /// </summary> /// <param name="tree">The tree</param> /// <returns>True if operation has fictoin</returns> static public bool HasFiction(this ObjectFormulaTree tree) { if (tree == null) { return(true); } IObjectOperation op = tree.Operation; if (op == null) { return(true); } if (StaticExtensionBaseTypes.HasAttributeBT <Attributes.FictionAttribute>(op)) { return(true); } for (int i = 0; i < tree.Count; i++) { if (tree[i].HasFiction()) { return(true); } } return(false); }
/// <summary> /// Gets double value function /// </summary> /// <param name="measure">Measure</param> /// <returns>Function</returns> public static Func <object, double> GetDoubleFunction(this IMeasurement measure) { return(StaticExtensionBaseTypes.GetDoubleFunction(measure.Type)); }