// TODO: Debugging private void VerifySelectExpression(ProjectionBindingExpression projectionBindingExpression) { if (projectionBindingExpression.QueryExpression != _selectExpression) { throw new InvalidOperationException(CoreStrings.QueryFailed(projectionBindingExpression.Print(), GetType().Name)); } }
private int GetProjectionIndex(ProjectionBindingExpression projectionBindingExpression) => projectionBindingExpression.ProjectionMember != null ? (int)((ConstantExpression)_selectExpression.GetMappedProjection(projectionBindingExpression.ProjectionMember)).Value : projectionBindingExpression.Index ?? throw new InvalidOperationException(CoreStrings.QueryFailed(projectionBindingExpression.Print(), GetType().Name));
private int GetProjectionIndex(ProjectionBindingExpression projectionBindingExpression) => projectionBindingExpression.ProjectionMember != null ? _selectExpression.GetMappedProjection(projectionBindingExpression.ProjectionMember).GetConstantValue <int>() : projectionBindingExpression.Index ?? throw new InvalidOperationException(CoreStrings.TranslationFailed(projectionBindingExpression.Print()));