IServiceProvider is an interface with single method:
object GetService(Type serviceType);
It\'s used to create instances of ty
This is the default implementation of IServiceCollection from Microsoft:
https://github.com/aspnet/DependencyInjection/blob/master/src/DI/ServiceCollection.cs
Looking at the code then you should be able to get an IServiceCollection simply by calling:
var serviceCollection = new Microsoft.Extensions.DependencyInjection.ServiceCollection();
Hope that helps :)