Exemple #1
0
        private void Initialise()
        {
            if (moduleHandler != null)
            {
                return;
            }

            moduleHandler = new ModuleHandler();
            moduleHandler.RegisterModules();
            moduleHandler.CheckDependencies();
            moduleHandler.AttachEventHandlers();

            SprocketSettings.Instance.ValidateSettings();
            if (!SprocketSettings.Instance.HasErrors)
            {
                if (OnInitialise != null)
                {
                    OnInitialise(moduleHandler.InterfaceImplementations);
                }

                if (OnInitialiseComplete != null)
                {
                    OnInitialiseComplete();
                }
            }
        }
Exemple #2
0
        internal void Initialise()
        {
            if (moduleHandler != null)
            {
                return;
            }

            moduleHandler = new ModuleHandler();
            moduleHandler.RegisterModules();
            moduleHandler.CheckDependencies();
            moduleHandler.AttachEventHandlers();

            SprocketSettings.Instance.ValidateSettings();
            if (!SprocketSettings.Instance.HasErrors)
            {
                if (OnInitialise != null)
                {
                    OnInitialise(moduleHandler.InterfaceImplementations);
                }

                if (OnInitialiseComplete != null)
                {
                    OnInitialiseComplete();
                }
            }
            else
            {
                HttpRuntime.UnloadAppDomain();                 // reset the application
            }
        }