public LinkConfig Link <TU, TV>(Expression <Func <TU, object> > expression1, Expression <Func <TV, object> > expression2, LinkType linkType = LinkType.Object) { var linkName = Expressions.GetPropertyName(expression1.Body); if (linkType == LinkType.Object) { var pos = linkName.LastIndexOf("."); if (pos != -1) { linkName = linkName.Substring(0, pos); } else { linkName = FindLinkName(typeof(TV)); } } var link = new LinkConfig(Type, linkName, linkType); Links.Add(link); _currentLink = link; _currentLink.Link(expression1, expression2); return(_currentLink); }
public LinkConfig Extend(LinkConfig link) { Parent = link; LinkName = string.Format("{0}.{1}", Parent.LinkName, LinkName); return(this); }
internal void GetFrom <T>(Expression <Func <T, object> > expression, LinkConfig link) { _getFromType = typeof(T); _getFromProperty = Expressions.GetPropertyName(expression.Body); _link = link; }
internal void SetLink(LinkConfig link) { _link = link; }
public void GetFrom <TU>(Expression <Func <TU, object> > expression, LinkConfig link) { _currentProperty.GetFrom(expression, link); }