/// <summary> /// Set 字段值 /// </summary> /// <param name="target">拥有该成员的类实例</param> /// <param name="value">字段/属性值</param> public override void Set(object target, object value) { _setter = _setter ?? MemberAccess_Field.InitializeSetter(_member); value = value ?? Helper.GetNullValue(_member.FieldType); _setter(target, value); }
/// <summary> /// Get 字段值 /// </summary> /// <param name="target">拥有该成员的类实例</param> /// <returns></returns> public override object Get(object target) { _getter = _getter ?? MemberAccess_Field.InitializeGetter(_member); return(_getter(target)); }