Skip to content

Instantly share code, notes, and snippets.

@kelumKP
Created February 28, 2021 08:26
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 kelumKP/4b216ade8f3f3935cb53a4add3cd4e94 to your computer and use it in GitHub Desktop.
Save kelumKP/4b216ade8f3f3935cb53a4add3cd4e94 to your computer and use it in GitHub Desktop.
ServiceModule class file in Console Application
public class ServiceModule : Module
{
protected override void Load(ContainerBuilder builder)
{
try
{
builder.RegisterAssemblyTypes(System.Reflection.Assembly.Load("Service")).Where(t => t.Name.EndsWith("Service")).AsImplementedInterfaces().InstancePerLifetimeScope();
}
catch (Exception ex)
{
throw ex;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment