internal FunctionDefinition(string name, DbLambda lambda, int startPosition, int endPosition) { Debug.Assert(name != null, "name can not be null"); Debug.Assert(lambda != null, "lambda cannot be null"); this._name = name; this._lambda = lambda; this._startPosition = startPosition; this._endPosition = endPosition; }
/// <summary> /// Convenience method indicating that the body of a Lambda <see cref="DbFunctionExpression"/> is now about to be visited. /// </summary> /// <param name="lambda">The DbLambda that is about to be visited</param> /// <exception cref="ArgumentNullException"><paramref name="lambda"/> is null</exception> protected virtual void VisitLambdaPre(DbLambda lambda) { EntityUtil.CheckArgumentNull(lambda, "lambda"); }
/// <summary> /// Convenience method for post-processing after a DbLambda has been visited. /// </summary> /// <param name="lambda">The previously visited DbLambda.</param> protected virtual void VisitLambdaPost(DbLambda lambda) { }
/// <summary> /// Dumps the specified DbLambda instance /// </summary> /// <param name="lambda">The DbLambda to dump.</param> internal void Dump(DbLambda lambda) { Begin("DbLambda"); Dump(System.Linq.Enumerable.Cast<DbExpression>(lambda.Variables), "Variables", "Variable"); Dump(lambda.Body, "Body"); End("DbLambda"); }
/// <summary> /// Convenience method indicating that the body of a Lambda <see cref="DbFunctionExpression"/> is now about to be visited. /// </summary> /// <param name="lambda">The DbLambda that is about to be visited</param> /// <exception cref="ArgumentNullException"><paramref name="lambda"/> is null</exception> protected virtual void VisitLambdaPre(DbLambda lambda) { //Contract.Requires(lambda != null); }