Closed mcdis closed 6 years ago
At this momebt IInjectionScope::Configure returning void, so I can't create routine that create child, configure them and return in one line. If Configure return IInjectionScope I can do this:
IInjectionScope ConfigSuperBuper(this IShell _this) => _this.Container.CreateChildScope().Configure(_ =>_.ExportAs<A,IA>());
but I have to
IInjectionScope ConfigSuperBuper(this IShell _this) { var child = this.Container.CreateChildScope(); child_.Configure(_ =>_.ExportAs<A,IA>()); return child; }
@mcdis I'd be open to changing the return type on configure.
I'm going to close this out in favor of each developer doing C# extensions to implement their own specific flavor for registration
At this momebt IInjectionScope::Configure returning void, so I can't create routine that create child, configure them and return in one line. If Configure return IInjectionScope I can do this:
but I have to