/// <summary> /// Checks if the given Expression is legal. /// </summary> /// <param name="e">Expression</param> /// <param name="list">Out: List of illegal Expressions</param> /// <returns>true, if the expression is legal. Otherwise false.</returns> public static bool IsLegal(this Expression e, out List<IllegalExpression> list) { CheckLegalExpression chk = new CheckLegalExpression(); chk.Visit(e); list = chk.IllegalExpression; return chk.IsLegal; }
/// <summary> /// Checks if the given Expression is legal. /// </summary> /// <param name="e">Expression</param> /// <param name="list">Out: List of illegal Expressions</param> /// <returns>true, if the expression is legal. Otherwise false.</returns> public static bool IsLegal(this Expression e, out List <IllegalExpression> list) { CheckLegalExpression chk = new CheckLegalExpression(); chk.Visit(e); list = chk.IllegalExpression; return(chk.IsLegal); }