point-platform / servant

Async .NET dependency injection, while you await!
Apache License 2.0
3 stars 0 forks source link

Allow specifying injection member via optional attribute #3

Open drewnoakes opened 8 years ago

drewnoakes commented 8 years ago

Add attribute [Injection], allowing specific delegation for Servant's construction purposes of the factory or constructor to use for instantiating the containing type. The attribute may only be used once within a type, and is only valid on constructors and static methods. Perhaps allow overload resolution, using name for factory method, but unfortunately this is trickier for constructors where you'd have to specify the types of arguments. The [Injection] attribute is also attributed with ReSharper's [MeansImplicitUse].