示例#1
0
        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");
        }
示例#2
0
 public void GetterObject()
 => ValueSetter <Yueluo> .GetSetter(_nameProperty).Invoke(_yueluo, "dalao");
示例#3
0
 public void GetterInt()
 => ValueSetter <Yueluo, int, int> .GetSetter(_ageProperty).Invoke(_yueluo, 16);
示例#4
0
 public void GetterString()
 => ValueSetter <Yueluo, string, string> .GetSetter(_nameProperty).Invoke(_yueluo, "dalao");