Is there a way to configure dependency injection in the standard Microsoft.Extensions.DependencyInjection.ServiceCollection
library in .net core, without actually having a reference to the implementation classes in question? (to get implementation class names from configuration files?)
For example:
services.AddTransient<ISomething>("The.Actual.Thing");// Where The.Actual.Thing is a concrete class
If your really keen to use strings parameters to load objects on the fly, you can use a factory that creates dynamic objects.
Lets say you have the following service
You can then