Example #1
0
        /// <summary>
        /// Initializes DI container and binds all dependencies
        /// </summary>
        /// <returns>The DI container instance</returns>
        public static Container InitializeDI()
        {
            var container = SimpleInjectorContainer.Initialize();

            CoreBootstrapper.BindDependencies();
            RedisBootstrapper.BindDependencies();
            ApiMockBootstrapper.BindDependencies();

            AssemblyBinder.BindAssemby(typeof(AppBootstrapper).Assembly);
            container.Container.Register <IRedisConfiguration>(RedisConfig.Read, Lifestyle.Singleton);
            return(container.Container);
        }
Example #2
0
 // Binds all services to default implementations
 public static void BindDependencies()
 => AssemblyBinder.BindAssemby(typeof(CoreBootstrapper).Assembly);