public void Init()
        {
            var container = new GlobalContainer();

            container.ExecuteInstaller(new AutoInstaller(GetType().Assembly));
            _container = container;
        }
        /// <summary>
        /// Create the container and load all relevant directories
        /// </summary>
        /// <returns></returns>
        private IContainer CreateContainer()
        {
            var container = new GlobalContainer();

            // Register local components
            container.ExecuteInstaller(new AutoInstaller(GetType().Assembly));

            // Load additional run modes
            container.LoadComponents <IRunMode>();

            // Load kernel and core modules
            container.LoadComponents <object>(type => type.GetCustomAttribute <KernelComponentAttribute>() != null);
            container.LoadComponents <IServerModule>(module => module.GetCustomAttribute <ServerModuleAttribute>() != null);

            // Load server modules
            container.LoadComponents <IServerModule>();

            return(container);
        }