Skip to content

Instantly share code, notes, and snippets.

@stevejgordon
Created October 16, 2018 07:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevejgordon/51ea36cef5ebcdc7f9d10c409ef00770 to your computer and use it in GitHub Desktop.
Save stevejgordon/51ea36cef5ebcdc7f9d10c409ef00770 to your computer and use it in GitHub Desktop.
var services = new ServiceCollection();
services.AddHttpClient();
var container = new Container();
container.Configure(config =>
{
// Register stuff in container, using the StructureMap APIs...
//Populate the container using the service collection...
config.Populate(services);
});
var serviceProvider = container.GetInstance<IServiceProvider>();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment