Skip to content

Instantly share code, notes, and snippets.

@bayological
Created September 28, 2018 02:02
Show Gist options
  • Save bayological/08410ce294a32d91913a263503d7001d to your computer and use it in GitHub Desktop.
Save bayological/08410ce294a32d91913a263503d7001d to your computer and use it in GitHub Desktop.
Type registration with Scurtor
public static void Run(IServiceCollection services)
{
services.Scan(scan => scan
.FromAssemblyOf<ICat>()
.AddClasses()
.AsImplementedInterfaces()
.WithTransientLifetime());
services.AddSingleton<IApplication, Application>();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment