Ejemplo n.º 1
0
        internal static void Find(Expression expression, NameGenerator nameGenerator, IIsEntityDecider isEntityDecider, Dictionary <string, NhJoinClause> joins, Dictionary <MemberExpression, QuerySourceReferenceExpression> expressionMap)
        {
            WhereJoinDetector f = new WhereJoinDetector(nameGenerator, isEntityDecider, joins, expressionMap);

            f._memberExpressionMappings.Push(new Dictionary <string, int>());

            f.VisitExpression(expression);

            foreach (var mapping in f._memberExpressionMappings.Pop())
            {
                // If outer join can never produce true, we can safely inner join.
                if ((mapping.Value & T) == 0)
                {
                    f.MakeInnerIfJoined(mapping.Key);
                }
            }
        }
Ejemplo n.º 2
0
        internal static void Find(Expression expression, NameGenerator nameGenerator, IIsEntityDecider isEntityDecider, Dictionary <string, NhJoinClause> joins, Dictionary <MemberExpression, QuerySourceReferenceExpression> expressionMap)
        {
            WhereJoinDetector f = new WhereJoinDetector(nameGenerator, isEntityDecider, joins, expressionMap);

            f.VisitExpression(expression);

            ExpressionValues values = f._values.Pop();

            foreach (var memberExpression in values.MemberExpressions)
            {
                // If outer join can never produce true, we can safely inner join.
                if (!values.GetValues(memberExpression).Contains(true))
                {
                    f.MakeInnerIfJoined(memberExpression);
                }
            }
        }
		internal static void Find(Expression expression, NameGenerator nameGenerator, IIsEntityDecider isEntityDecider, Dictionary<string, NhJoinClause> joins, Dictionary<MemberExpression, QuerySourceReferenceExpression> expressionMap)
		{
			WhereJoinDetector f = new WhereJoinDetector(nameGenerator, isEntityDecider, joins, expressionMap);

			f.VisitExpression(expression);

			ExpressionValues values = f._values.Pop();

			foreach (var memberExpression in values.MemberExpressions)
			{
				// If outer join can never produce true, we can safely inner join.
				if (!values.GetValues(memberExpression).Contains(true))
				{
					f.MakeInnerIfJoined(memberExpression);
				}
			}
		}
Ejemplo n.º 4
0
        internal static void Find(Expression expression, NameGenerator nameGenerator, IIsEntityDecider isEntityDecider, Dictionary<string, NhJoinClause> joins, Dictionary<MemberExpression, QuerySourceReferenceExpression> expressionMap)
        {
            WhereJoinDetector f = new WhereJoinDetector(nameGenerator, isEntityDecider, joins, expressionMap);

            f._memberExpressionMappings.Push(new Dictionary<string, int>());

            f.VisitExpression(expression);

            foreach (var mapping in f._memberExpressionMappings.Pop())
            {
                // If outer join can never produce true, we can safely inner join.
                if ((mapping.Value & T) == 0)
                {
                    f.MakeInnerIfJoined(mapping.Key);
                }
            }
        }