Skip to content

Instantly share code, notes, and snippets.

@dcomartin
Created November 18, 2016 01:49
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 dcomartin/a5fc2d0d83a06bbcbbda81cdaffce069 to your computer and use it in GitHub Desktop.
Save dcomartin/a5fc2d0d83a06bbcbbda81cdaffce069 to your computer and use it in GitHub Desktop.
var container = new Container();
container.Configure(cfg =>
{
cfg.Scan(scanner =>
{
scanner.WithDefaultConventions();
scanner.TheCallingAssembly();
scanner.ConnectImplementationsToTypesClosing(typeof(IPostRequestHandler<,>));
});
cfg.For(typeof(ICancellableAsyncRequestHandler<,>)).DecorateAllWith(typeof(Pipeline<,>));
cfg.Populate(services);
});
return container.GetInstance<IServiceProvider>();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment