예제 #1
0
        public static void Initialize(List <BaseContainerModule> appContainerModules, string appName)
        {
            var containerModules = new List <BaseContainerModule> {
                new ContainerModule(appName)
            };

            containerModules.AddRange(appContainerModules);
            DependencyContainer.Build(containerModules);
        }
예제 #2
0
        static void Main(string[] args)
        {
            var container = DependencyContainer.Build();

            ActorSystem = Akka.Actor.ActorSystem.Create("TrangselskattActorSystem");
            var resolver = new StructureMapDependencyResolver(container, ActorSystem);
            var _        = ActorSystem.ActorOf(ActorSystem.DI().Props <VehicleCoordinatorActor>(), "VehicleCoordinator");

            Console.ReadLine();
        }
예제 #3
0
        protected BaseTest()
        {
            _mockKernel = new MockKernel();
            DependencyContainer.Build(_mockKernel);

            // Ensure any usages of GetMock<ICacheProvider> will return the mock
            // that is setup on injected ICacheManager.AppCache
            var mockCacheManager         = GetMock <ICacheManager>();
            var mockSessionCacheProvider = GetMock <ICacheProvider>();

            mockCacheManager.SetupGet(m => m.AppCache).Returns(mockSessionCacheProvider.Object);
        }
예제 #4
0
 protected BaseTest()
 {
     _mockKernel = new MoqMockingKernel();
     DependencyContainer.Build(_mockKernel);
 }