/// <summary>
/// Toto jsou jedin podporovan roziujc metody (Where a Take)
/// Jednodue projdeme podmnku Where a parametr Take a 
/// pelome je na instanci typu FlightStatus.QueryParameters.
/// </summary>
protected override Expression VisitMethodCall(MethodCallExpression m) {
if (m.Method.DeclaringType == typeof(Queryable)) {
switch (m.Method.Name) {
case "Where":
this.Visit(m.Arguments[0]);
LambdaExpression lambda =
	(LambdaExpression) StripQuotes(m.Arguments[1]);
this.Visit(lambda.Body);
return m;
case "Take":
this.Visit(m.Arguments[0]);
ConstantExpression constant =
	m.Arguments[1] as ConstantExpression;
if (constant == null) {
throw new NotImplementedException(
		"Take podporovno pouze pro konstantn hodnoty.");
}
queryParameters.MaxFlights = GetIntConstant(constant);
return m;
}
}
throw new NotSupportedException(
	string.Format("Metoda '{0}' nen podporovna.", m.Method.Name));
}

private static Expression StripQuotes(Expression e) {
while (e.NodeType == ExpressionType.Quote) {
	e = ((UnaryExpression) e).Operand;
}
return e;
}
