public PropertySetterTest() { _yueluo = Yueluo.Create(); _nameProperty = typeof(Yueluo).GetProperty(nameof(Yueluo.Name)) !; _ageProperty = typeof(Yueluo).GetProperty(nameof(Yueluo.Age)) !; _nameFunc = ValueSetter <Yueluo, string, string> .GetSetter(_nameProperty); ValueSetter <Yueluo, int, int> .GetSetter(_ageProperty).Invoke(_yueluo, 16); ValueSetter <Yueluo> .GetSetter(_nameProperty).Invoke(_yueluo, "dalao"); }
public void GetterObject() => ValueSetter <Yueluo> .GetSetter(_nameProperty).Invoke(_yueluo, "dalao");
public void GetterInt() => ValueSetter <Yueluo, int, int> .GetSetter(_ageProperty).Invoke(_yueluo, 16);
public void GetterString() => ValueSetter <Yueluo, string, string> .GetSetter(_nameProperty).Invoke(_yueluo, "dalao");