Example #1
0
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// The GetInstaller method instantiates the relevant Component Installer
        /// </summary>
        /// <param name="installerType">The type of Installer</param>
        /// <history>
        ///     [cnurse]	07/25/2007  created
        /// </history>
        /// -----------------------------------------------------------------------------
        public static ComponentInstallerBase GetInstaller(string installerType)
        {
            ComponentInstallerBase installer = null;

            switch (installerType)
            {
            case "File":
                installer = new FileInstaller();
                break;

            case "Assembly":
                installer = new AssemblyInstaller();
                break;

            case "ResourceFile":
                installer = new ResourceFileInstaller();
                break;

            case "AuthenticationSystem":
            case "Auth_System":
                installer = new AuthenticationInstaller();
                break;

            case "DashboardControl":
                installer = new DashboardInstaller();
                break;

            case "Script":
                installer = new ScriptInstaller();
                break;

            case "Config":
                installer = new ConfigInstaller();
                break;

            case "Cleanup":
                installer = new CleanupInstaller();
                break;

            case "Skin":
                installer = new SkinInstaller();
                break;

            case "Container":
                installer = new ContainerInstaller();
                break;

            case "Module":
                installer = new ModuleInstaller();
                break;

            case "CoreLanguage":
                installer = new LanguageInstaller(LanguagePackType.Core);
                break;

            case "ExtensionLanguage":
                installer = new LanguageInstaller(LanguagePackType.Extension);
                break;

            case "Provider":
                installer = new ProviderInstaller();
                break;

            case "SkinObject":
                installer = new SkinControlInstaller();
                break;

            case "UrlProvider":
                installer = new UrlProviderInstaller();
                break;

            case "Widget":
                installer = new WidgetInstaller();
                break;

            case "JavaScript_Library":
                installer = new JavaScriptLibraryInstaller();
                break;

            case "JavaScriptFile":
                installer = new JavaScriptFileInstaller();
                break;

            default:
                //Installer type is defined in the List
                var           listController = new ListController();
                ListEntryInfo entry          = listController.GetListEntryInfo("Installer", installerType);

                if (entry != null && !string.IsNullOrEmpty(entry.Text))
                {
                    //The class for the Installer is specified in the Text property
                    installer = (ComponentInstallerBase)Reflection.CreateObject(entry.Text, "Installer_" + entry.Value);
                }
                break;
            }
            return(installer);
        }
Example #2
0
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// The GetInstaller method instantiates the relevant Component Installer
        /// </summary>
        /// <param name="installerType">The type of Installer</param>
        /// <history>
        /// 	[cnurse]	07/25/2007  created
        /// </history>
        /// -----------------------------------------------------------------------------
        public static ComponentInstallerBase GetInstaller(string installerType)
        {
            ComponentInstallerBase installer = null;
            switch (installerType)
            {
                case "File":
                    installer = new FileInstaller();
                    break;
                case "Assembly":
                    installer = new AssemblyInstaller();
                    break;
                case "ResourceFile":
                    installer = new ResourceFileInstaller();
                    break;
                case "AuthenticationSystem":
                case "Auth_System":
                    installer = new AuthenticationInstaller();
                    break;
                case "DashboardControl":
                    installer = new DashboardInstaller();
                    break;
                case "Script":
                    installer = new ScriptInstaller();
                    break;
                case "Config":
                    installer = new ConfigInstaller();
                    break;
                case "Cleanup":
                    installer = new CleanupInstaller();
                    break;
                case "Skin":
                    installer = new SkinInstaller();
                    break;
                case "Container":
                    installer = new ContainerInstaller();
                    break;
                case "Module":
                    installer = new ModuleInstaller();
                    break;
                case "CoreLanguage":
                    installer = new LanguageInstaller(LanguagePackType.Core);
                    break;
                case "ExtensionLanguage":
                    installer = new LanguageInstaller(LanguagePackType.Extension);
                    break;
                case "Provider":
                    installer = new ProviderInstaller();
                    break;
                case "SkinObject":
                    installer = new SkinControlInstaller();
                    break;
                case "UrlProvider":
                    installer = new UrlProviderInstaller();
                    break;
                case "Widget":
                    installer = new WidgetInstaller();
                    break;
                default:
                    //Installer type is defined in the List
                    var listController = new ListController();
                    ListEntryInfo entry = listController.GetListEntryInfo("Installer", installerType);

                    if (entry != null && !string.IsNullOrEmpty(entry.Text))
                    {
						//The class for the Installer is specified in the Text property
                        installer = (ComponentInstallerBase) Reflection.CreateObject(entry.Text, "Installer_" + entry.Value);
                    }
                    break;
            }
            return installer;
        }