public FieldAdapter(FieldInfo info) { this.Info = info; if (info.IsPublic) { var t = MemberHandlerGenerator.Generate(info.DeclaringType, info); Handler = (IMemberHandler)ClassHelper.CreateInstance(t); } else { Handler = new FieldHandler(info); } }
public PropertyAdapter(PropertyInfo info) { this.Info = info; var method = info.GetGetMethod(); if (method != null && method.IsPublic) { var t = MemberHandlerGenerator.Generate(info.DeclaringType, info); Handler = (IMemberHandler)ClassHelper.CreateInstance(t); } else { Handler = new PropertyHandler(info); } }