public Expression <Func <T1, T2, bool> > GetEqualityExpression <T1, T2>()
        {
            IExpresionList <T1, T2> config;

            if (dictionary.TryGetValue <T1, T2>(out config))
            {
                return(equalityComposer.Build(config, equalityConstructor));
            }

            return(equalityConstructor.Build <T1, T2>());
        }
Example #2
0
        public Expression <Func <T1, T2, bool> > BuildExpression <T1, T2, TReturn1, TReturn2>(Expression <Func <T1, TReturn1> > a, Expression <Func <T2, TReturn2> > b)
        {
            IExpresionList <TReturn1, TReturn2> config;

            if (dictionary.TryGetValue <TReturn1, TReturn2>(out config))
            {
                var expr = equalityComposer.Build(config, this);
                return(a.NestExpression(b, expr));
            }

            return(this.Build <T1, T2, TReturn1, TReturn2>(a, b));
        }