예제 #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");