Пример #1
0
        public static bool CheckPrerequisites(Action <string> showErrorMessage, out bool fixWithInit)
        {
            string str;

            fixWithInit = false;
            PrerequisiteCheckResult prerequisiteCheckResult = CheckStoragePrerequisites.CheckSqlInstanceAndDatabase(out str);

            if (prerequisiteCheckResult == PrerequisiteCheckResult.DatabaseNotInstalledOrLoginFailed || prerequisiteCheckResult == PrerequisiteCheckResult.SqlExpressInstanceNotInstalledOrRunning)
            {
                fixWithInit = true;
                return(false);
            }
            prerequisiteCheckResult = PrerequisiteCheckResult.None;
            prerequisiteCheckResult = CheckStoragePrerequisites.CheckDbAccess(str);
            if (prerequisiteCheckResult == PrerequisiteCheckResult.NoDatabaseAccess)
            {
                fixWithInit = true;
                return(false);
            }
            fixWithInit = false;
            return(CheckStoragePrerequisites.CheckPortReservation(showErrorMessage));
        }