Mercurial > pub > bltoolkit
comparison Source/Data/Linq/Builder/ExpressionBuilder.cs @ 6:11b6da379593
Исправлена странная ошибка при использовании OfType<...>().Where(...)
author | cin |
---|---|
date | Mon, 05 Dec 2016 05:50:52 +0300 |
parents | f7d63a092920 |
children |
comparison
equal
deleted
inserted
replaced
5:f7d63a092920 | 6:11b6da379593 |
---|---|
690 } | 690 } |
691 | 691 |
692 if (sequence != method.Arguments[0] || predicate != method.Arguments[1]) | 692 if (sequence != method.Arguments[0] || predicate != method.Arguments[1]) |
693 { | 693 { |
694 var methodInfo = method.Method.GetGenericMethodDefinition(); | 694 var methodInfo = method.Method.GetGenericMethodDefinition(); |
695 var queryableType = sequence.Type.GetInterface(typeof(IQueryable<>).Name); | 695 var queryableType = sequence.Type.GetInterface(typeof(IEnumerable<>).Name); |
696 var genericType = queryableType.GetGenericArguments()[0]; | 696 var genericType = queryableType.GetGenericArguments()[0]; |
697 var newMethod = methodInfo.MakeGenericMethod(genericType); | 697 var newMethod = methodInfo.MakeGenericMethod(genericType); |
698 | 698 |
699 method = Expression.Call(newMethod, sequence, predicate); | 699 method = Expression.Call(newMethod, sequence, predicate); |
700 | 700 |