/// <summary>
        /// Unmount the current container.
        /// </summary>
        internal void UnmountContainer()
        {
            if (unityServiceContainer != null)
            {
                foreach (IServiceModule serviceModule in unityServiceContainer.GetAllInstances())
                {
                    serviceModule.RemoveServiceDependencies();
                }

                unityServiceContainer = null;
            }
        }
        /// <summary>
        /// Mounts a container inside the service locator.
        /// </summary>
        /// <param name="unityServiceContainer">The new container.</param>
        internal void MountContainer(IUnityServiceContainer unityServiceContainer)
        {
            UnmountContainer();

            this.unityServiceContainer = unityServiceContainer;

            foreach (IServiceModule serviceModule in unityServiceContainer.GetAllInstances())
            {
                serviceModule.AddServiceDependencies();
            }

            foreach (IServiceModule serviceModule in unityServiceContainer.GetAllInstances())
            {
                serviceModule.Initialize();
            }
        }