null type resolving.
This commit is contained in:
parent
3b9494d510
commit
65294edebc
@ -97,6 +97,8 @@ namespace PoweredSoft.DynamicLinq.ConsoleApp
|
||||
// group the piece by common parameters
|
||||
var groups = Parser.GroupBySharedParameters();
|
||||
|
||||
var nullType = groups.ResolveNullHandlingType();
|
||||
|
||||
Expression currentExpression = null;
|
||||
groups.ReversedForEach(group =>
|
||||
{
|
||||
|
@ -28,5 +28,16 @@ namespace PoweredSoft.DynamicLinq.Parser
|
||||
{
|
||||
return group.Pieces.Last().EnumerableType;
|
||||
}
|
||||
|
||||
public static Type ResolveNullHandlingType(this List<ExpressionParserPieceGroup> groups)
|
||||
{
|
||||
if (groups.Count() == 1)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
var type = groups.Last().Pieces.Last().Type;
|
||||
return typeof(IEnumerable<>).MakeGenericType(type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user