DbAggregateExpression.cs 913 B

1234567891011121314151617181920212223242526272829
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Collections.ObjectModel;
  4. using System.Linq;
  5. using System.Reflection;
  6. using System.Text;
  7. namespace Ant.DbExpressions
  8. {
  9. public class DbAggregateExpression : DbExpression
  10. {
  11. MethodInfo _method;
  12. ReadOnlyCollection<DbExpression> _parameters;
  13. public DbAggregateExpression(Type type, MethodInfo method, IList<DbExpression> parameters)
  14. : base(DbExpressionType.Aggregate, type)
  15. {
  16. this._method = method;
  17. this._parameters = new ReadOnlyCollection<DbExpression>(parameters);
  18. }
  19. public MethodInfo Method { get { return this._method; } }
  20. public ReadOnlyCollection<DbExpression> Parameters { get { return this._parameters; } }
  21. public override T Accept<T>(DbExpressionVisitor<T> visitor)
  22. {
  23. return visitor.Visit(this);
  24. }
  25. }
  26. }