-
Notifications
You must be signed in to change notification settings - Fork 152
Open
Labels
Milestone
Description
All Register overloads of the registration API return void. By instead returning an object that describes the made registration, it would allow users and third parties to build extension methods on top of this.
Here are some examples of what can be done on top of this:
// InitializeWith method that forwards to container.RegisterInitializer<TImplementation>()
container.Register<IService, ServiceImpl>().InitializeWith(s => s.Value = configValue);
// Register a configuration value
container.Register<IService, ServiceImpl>().WithConstructorArgument(configurationString);bugproof, Aluminus, qujck and MooVC