コード例 #1
0
        public static void Initialize()
        {
            // Reset the global dependency container
            DependencyInjectionHelper.ResetGlobalContainer();

            // Register test dependency mappings
            new DependencyContainer()
            .RegisterSingleton <Game.Factories.IAvatarFactory, TestAvatarFactory>();
            ////.RegisterType<Core.Resources.Management.IResourceLoader>

            // Register the unity dependency mappings
            UnityDependencyContainerManager.Register();
            Assert.IsNotNull(UnityDependencyContainerManager.Container);

            // Initialize logging with a test logger
            TestLogger.InitializeLog();
        }
コード例 #2
0
 public void Initialize()
 {
     DependencyInjectionHelper.ResetGlobalContainer();
     UnityDependencyContainerManager.Register();
     Assert.IsNotNull(UnityDependencyContainerManager.Container);
 }
コード例 #3
0
 /// <summary>Initializes a new instance of the RuntimeRegistrationBehaviour class</summary>
 public RuntimeRegistrationBehaviour()
 {
     GlobalContainer.Reset();
     UnityDependencyContainerManager.Register();
 }