-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…and other collection types. Interim commit for Projection IQueryable
- Loading branch information
1 parent
6c030f6
commit d2d6275
Showing
17 changed files
with
238 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Linq.Expressions; | ||
using System.Text; | ||
|
||
namespace ExpressMapper | ||
{ | ||
public class ProjectionAccessMemberVisitor : ExpressionVisitor | ||
{ | ||
private Expression _exp; | ||
//private ParameterExpression _src; | ||
private Type _type; | ||
public ProjectionAccessMemberVisitor(Type type, Expression exp) | ||
{ | ||
_exp = exp; | ||
_type = type; | ||
//_src = src; | ||
} | ||
|
||
//protected override Expression VisitParameter(ParameterExpression node) | ||
//{ | ||
// if (node.Type == _type) | ||
// { | ||
// return _src; | ||
// } | ||
// return base.VisitParameter(node); | ||
//} | ||
|
||
protected override Expression VisitMember(MemberExpression node) | ||
{ | ||
if (node.Expression.Type == _type) | ||
{ | ||
return Expression.PropertyOrField(_exp, node.Member.Name); | ||
} | ||
return base.VisitMember(node); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.