Created
February 28, 2021 08:26
-
-
Save kelumKP/4b216ade8f3f3935cb53a4add3cd4e94 to your computer and use it in GitHub Desktop.
ServiceModule class file in Console Application
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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