コード例 #1
0
        public IPropertyBuilder Register <T>(string propertyName)
        {
            if (FastReflection.ExistsSetter(Object, propertyName) is false)
            {
                RegisterReadOnly(() => FastReflection.GetProperty <T>(Object, propertyName));
            }
            else
            {
                Register(
                    () => FastReflection.GetProperty <T>(Object, propertyName),
                    (x) =>
                {
                    FastReflection.SetProperty(Object, propertyName, x);
                });
            }

            _properties[_properties.Count - 1].Name = propertyName;

            return(this);
        }