Open dadhi opened 1 year ago
Also, just so you know, AutoFac looks at the attributes that C# decorates classes and properties with so that no extra properties or attributes are necessary. It doesn't set all properties. Just the required ones which is really nice.
@TonyValenti got it
Any idea when this will be released?
Here is the example how to configure the required properties
support for DryIoc v5.4.0 (currently in preview)
Hi @dadhi , Would you consider making required properties on by default? It would be really great if Dryloc was compatible with Autofac in this way so that folks could simply adopt it and it just work. Also, if it was on by default, it would allow you to promote additional lines of code saved because all the overhead of constructor chaining then goes away automatically.
@TonyValenti For the next version v5.4.0 you need to specify the support for the required properties
via:
var c = new Container(rules => rules.With(propertiesAndFields: PropertiesAndFields.RequiredProperties()));
I still need to work out the performance considerations to make it the default rule. So it will go either into v5.5.0 or to v6.0.0
The issue for the custom rule support #571
Discussed in https://github.com/dadhi/DryIoc/discussions/562