Esempio n. 1
0
        public static BMCInstallationType GetInstallationType()
        {
            BMCInstallationType insType = BMCInstallationType.None;

            try
            {
                string installationType = ConfigApplicationFactory.GetValue("Honeyframe", "InstallationType").ToUpper();
                switch (installationType)
                {
                case "EXCHANGECLIENT":
                    insType = BMCInstallationType.ExchangeClient;
                    break;

                case "EXCHANGESERVER":
                    insType = BMCInstallationType.ExchangeServer;
                    break;

                case "ENTERPRISECLIENT":
                    insType = BMCInstallationType.EnterpriseClient;
                    break;

                case "ENTERPRISESERVER":
                    insType = BMCInstallationType.EnterpriseServer;
                    break;

                default:
                    break;
                }

                ActualInstallationType = ((insType == BMCInstallationType.EnterpriseServer) || (insType == BMCInstallationType.EnterpriseClient) ?
                                          BMCCategorizedInstallationTypes.Enterprise : BMCCategorizedInstallationTypes.Exchange);
                ActualApplicationType = ((insType == BMCInstallationType.EnterpriseServer) || (insType == BMCInstallationType.ExchangeServer) ?
                                         BMCCategoriedApplicationTypes.Server : BMCCategoriedApplicationTypes.Client);

                if (ActiveInstallationType == BMCCategorizedInstallationTypes.None)
                {
                    ActiveInstallationType = ActualInstallationType;
                }
                BMC.Common.LogManagement.LogManager.WriteLog("GetInstallationType returns : " + insType.ToString(), BMC.Common.LogManagement.LogManager.enumLogLevel.Debug);
                BMC.Common.LogManagement.LogManager.WriteLog("ActiveInstallationType  returns : " + ActiveInstallationType.ToString(), BMC.Common.LogManagement.LogManager.enumLogLevel.Debug);
            }
            catch { }

            if (insType == BMCInstallationType.None)
            {
                Environment.FailFast("Installation Type does not available.");
            }
            return(insType);
        }
        public static BMCInstallationType GetInstallationType()
        {
            BMCInstallationType insType = BMCInstallationType.None;

            try
            {
                string installationType = ConfigApplicationFactory.GetValue("Honeyframe", "InstallationType").ToUpper();
                switch (installationType)
                {
                    case "EXCHANGECLIENT":
                        insType = BMCInstallationType.ExchangeClient;
                        break;

                    case "EXCHANGESERVER":
                        insType = BMCInstallationType.ExchangeServer;
                        break;

                    case "ENTERPRISECLIENT":
                        insType = BMCInstallationType.EnterpriseClient;
                        break;

                    case "ENTERPRISESERVER":
                        insType = BMCInstallationType.EnterpriseServer;
                        break;

                    default:
                        break;
                }

                ActualInstallationType = ((insType == BMCInstallationType.EnterpriseServer) || (insType == BMCInstallationType.EnterpriseClient) ?
                    BMCCategorizedInstallationTypes.Enterprise : BMCCategorizedInstallationTypes.Exchange);
                ActualApplicationType = ((insType == BMCInstallationType.EnterpriseServer) || (insType == BMCInstallationType.ExchangeServer) ?
                    BMCCategoriedApplicationTypes.Server : BMCCategoriedApplicationTypes.Client);

                if (ActiveInstallationType == BMCCategorizedInstallationTypes.None)
                {
                    ActiveInstallationType = ActualInstallationType;
                }
                BMC.Common.LogManagement.LogManager.WriteLog("GetInstallationType returns : " + insType.ToString(), BMC.Common.LogManagement.LogManager.enumLogLevel.Debug);
                BMC.Common.LogManagement.LogManager.WriteLog("ActiveInstallationType  returns : " + ActiveInstallationType.ToString(), BMC.Common.LogManagement.LogManager.enumLogLevel.Debug);
            }
            catch { }

            if (insType == BMCInstallationType.None)
            {
                Environment.FailFast("Installation Type does not available.");
            }
            return insType;
        }