protected internal virtual FieldBinding VisitFieldBinding(FieldBinding fb) { var r = Visit(fb.Binding); if (r == fb.Binding) { return(fb); } return(new FieldBinding(fb.FieldInfo, r)); }
public Expression GetBinding(FieldInfo fi) { if (Bindings == null) { throw new InvalidOperationException("EntityInitiExpression not completed"); } FieldBinding binding = Bindings.Where(fb => ReflectionTools.FieldEquals(fi, fb.FieldInfo)).SingleEx(() => "field '{0}' in {1} (field Ignored?)".FormatWith(fi.Name, this.Type.TypeName())); return(binding.Binding); }
protected virtual bool CompareFieldBinding(FieldBinding a, FieldBinding b) { return(ReflectionTools.FieldEquals(a.FieldInfo, b.FieldInfo) && Compare(a.Binding, b.Binding)); }
protected virtual FieldBinding VisitFieldBinding(FieldBinding fb) { var r = Visit(fb.Binding); if(r == fb.Binding) return fb; return new FieldBinding(fb.FieldInfo, r); }