public DynamicTypeInfo WithAutoProperty( string propertyName, Type propertyType ) { var propertyInfo = new DynamicPropertyInfo(this, propertyName, propertyType); propertyInfo.WithAutoGetterSetter(); return(this); }
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); }