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