/// <summary> /// Creates a new object that is a copy of the current instance. /// </summary> /// <returns> /// A new object that is a copy of this instance. /// </returns> public override object Clone() { FormulaCondition condition = base.Clone() as FormulaCondition; condition.customValueType = this.customValueType; return(condition); }
/// <summary> /// Creates a validator based on a formula. /// </summary> /// <param name="formula">The formula condition.</param> /// <returns>Returns a new validator.</returns> public static DataValidator CreateFormulaValidator(string formula) { string str = formula; return(new DataValidator(FormulaCondition.FromFormula(str.TrimStart(new char[] { '=' }))) { type = CriteriaType.Custom }); }