/// <summary>
/// Ovuje, e jde o konstantu a memberAccess.
/// Pot provd odlin peklad podle 
/// typu lenu, s nm se m porovnvat.
/// </summary>
private Expression VisitBinaryComparison(BinaryExpression b) {
// PRVN KROK
// Podporujeme pouze porovnvn mezi konstantou 
// a ppadnm parametrem dotazu na let.
ConstantExpression constant =
	(b.Left as ConstantExpression ?? b.Right as ConstantExpression);
MemberExpression memberAccess =
	(b.Left as MemberExpression ?? b.Right as MemberExpression);

// DRUH KROK
// Oven parametr
if ((memberAccess == null) || (constant == null)) {
throw new NotSupportedException(
string.Format(
"Binrn opertor'{0}' mus porovnvat platn "
+"atribut letu s konstantou.",
b.NodeType));
}

// Potebujeme zskat konstantn hodnotu.
if (constant.Value == null) {
throw new NotSupportedException(
string.Format(
"Konstanta NULL nen v binrnm opertoru {0} povolena.",
b.ToString()));
}
switch (Type.GetTypeCode(constant.Value.GetType())) {
case TypeCode.String:
case TypeCode.Int16:
case TypeCode.Int32:
case TypeCode.Double:
	break;
default:
throw new NotSupportedException(
string.Format(
"Konstanta {0} je nepodporovanho typu ({1}).",
constant.ToString(),
constant.Value.GetType().Name));
}
// TET KROK
// Vyhledn nzvu lenu pomoc Reflection
// Pedpokldme, e etzcov vlastnosti ve td Flight maj tyt
// nzvy ve td QueryParameters.
// Provedeme speciln oven pro leny tdy Flight sloench typ.
if (memberAccess.Member.ReflectedType == typeof(TimeSpan)) {
TranslateTimeSpanComparison(b.NodeType, constant, memberAccess);
return b;
}
else if (memberAccess.Member.ReflectedType == typeof(AirportInformation)) {
TranslateAirportInformationComparison(constant, memberAccess);
return b;
}
else if (memberAccess.Member.ReflectedType != typeof(Flight)) {
throw new NotSupportedException(
string.Format(
"len {0} nen typu Flight.",
memberAccess.ToString()));
}
TranslateStandardComparisons(b.NodeType, constant, memberAccess);
return b;
}
