using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Reflection; namespace Ant.DbExpressions { public class DbMethodCallExpression : DbExpression { DbExpression _object; MethodInfo _method; ReadOnlyCollection _arguments; public DbMethodCallExpression(DbExpression @object, MethodInfo method, IList arguments) : base(DbExpressionType.Call) { this._object = @object; this._method = method; this._arguments = new ReadOnlyCollection(arguments); } public ReadOnlyCollection Arguments { get { return this._arguments; } } public MethodInfo Method { get { return _method; } } public DbExpression Object { get { return _object; } } public override Type Type { get { return this.Method.ReturnType; } } public override T Accept(DbExpressionVisitor visitor) { return visitor.Visit(this); } } }