예제 #1
0
        public DatabaseMode CheckVersionInformation(string currentVersion, ref string messageString)
        {
            var versionMode = DatabaseMode.Correct;

            try
            {
                string databaseVersion = DbVersion.GetDatabaseVersion();
                if (databaseVersion != currentVersion)
                {
                    versionMode   = DatabaseMode.InCorrect;
                    messageString = "Incorrect database version please run the parser. \n Current database version: " +
                                    databaseVersion + "  Expected database version: " + currentVersion;
                }
            }
            catch (Exception ex)
            {
                versionMode   = DatabaseMode.UnVersion;
                messageString = "Database unversioned please run the parser";
            }
            return(versionMode);
        }