Esempio n. 1
0
        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);
        }
Esempio n. 3
0
 protected virtual bool CompareFieldBinding(FieldBinding a, FieldBinding b)
 {
     return(ReflectionTools.FieldEquals(a.FieldInfo, b.FieldInfo) && Compare(a.Binding, b.Binding));
 }
Esempio n. 4
0
        protected virtual FieldBinding VisitFieldBinding(FieldBinding fb)
        {
            var r = Visit(fb.Binding);

            if(r == fb.Binding)
                return fb; 

            return new FieldBinding(fb.FieldInfo, r); 
        }