advancing well :) I think I might have it this time.
This commit is contained in:
parent
f0ed7d9bd5
commit
4e6dda09b5
@ -26,8 +26,15 @@ namespace PoweredSoft.DynamicLinq.ConsoleApp
|
||||
*/
|
||||
public static void Run()
|
||||
{
|
||||
// the expression parser.
|
||||
var ep = new ExpressionParser(typeof(Author), "Posts.Comments.Id");
|
||||
ep.Parse();
|
||||
|
||||
// the builder.
|
||||
var per = new PathExpressionResolver(ep);
|
||||
per.Resolve();
|
||||
|
||||
// the result expression.
|
||||
var result = per.Result;
|
||||
}
|
||||
}
|
||||
|
||||
@ -41,6 +48,24 @@ namespace PoweredSoft.DynamicLinq.ConsoleApp
|
||||
public Type EnumerableType => MemberExpression.Type.GenericTypeArguments.FirstOrDefault();
|
||||
}
|
||||
|
||||
public class PathExpressionResolver
|
||||
{
|
||||
public SelectNullHandling NullChecking { get; set; } = SelectNullHandling.LeaveAsIs;
|
||||
public SelectCollectionHandling CollectionHandling { get; set; } = SelectCollectionHandling.LeaveAsIs;
|
||||
public ExpressionParser Parser { get; protected set; }
|
||||
public Expression Result { get; protected set; }
|
||||
|
||||
public PathExpressionResolver(ExpressionParser parser)
|
||||
{
|
||||
Parser = parser;
|
||||
}
|
||||
|
||||
public void Resolve()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class ExpressionParser
|
||||
{
|
||||
public ParameterExpression Parameter { get; protected set; }
|
||||
|
Loading…
Reference in New Issue
Block a user