Exemplo n.º 1
0
        public DynamicTypeInfo WithAutoProperty(
            string propertyName,
            Type propertyType
            )
        {
            var propertyInfo = new DynamicPropertyInfo(this, propertyName, propertyType);

            propertyInfo.WithAutoGetterSetter();

            return(this);
        }
Exemplo n.º 2
0
        public DynamicTypeInfo WithProperty(
            string propertyName,
            Type propertyType,
            Action <DynamicMethodBody> getmethod,
            Action <DynamicMethodBody> setmethod = null
            )
        {
            var propertyInfo = new DynamicPropertyInfo(this, propertyName, propertyType);

            getmethod(propertyInfo.WithGetter());
            setmethod?.Invoke(propertyInfo.WithSetter());

            return(this);
        }