public override bool IsStructurallyEquivalentTo(CellFunction otherFunction) { if (otherFunction is FormulaFunction otherFormulaFunction) { return(Expression.IsStructurallyEquivalentTo(otherFormulaFunction.Expression)); } return(false); }
public override bool IsStructurallyEquivalentTo(CellFunction otherFunction) { if (!(otherFunction is OutputFieldFunction otherOutputFieldFunction) || Statements.Length != otherOutputFieldFunction.Statements.Length) { return(false); } for (int i = 0; i < Statements.Length; i++) { if (!Statements[i].IsStructurallyEquivalentTo(otherOutputFieldFunction.Statements[i])) { return(false); } } return(true); }
public abstract bool IsStructurallyEquivalentTo(CellFunction otherFunction);