// Register all tasks private static void AddDependenciesAutomatically(IServiceCollection services) { DependencyUtility.RegisterInterfaces("Task", services, Assembly.GetAssembly(typeof(IDatabaseEventLogCleanupTask)), Assembly.GetAssembly(typeof(DatabaseEventLogCleanupTask)), DependencyTypes.Transient); }
// The choice of seeding types used to get the exact assemblies is arbitrary as long as they // reside in the correct assemblies private static void AddDependenciesAutomatically(IServiceCollection services) { DependencyUtility.RegisterInterfaces("Service", services, Assembly.GetAssembly(typeof(IMessagesService)), Assembly.GetAssembly(typeof(MessagesService))); DependencyUtility.RegisterInterfaces("Repository", services, Assembly.GetAssembly(typeof(IMessagesRepository)), Assembly.GetAssembly(typeof(MessagesRepository))); }