Ejemplo n.º 1
0
        public static void ReleaseInstance()
        {
            string Function_Name = "ReleaseInstance";

            LogHelper.Trace(CLASS_NAME, Function_Name, "Function_Entered");
            if (s_SimpleDatabase != null)
            {
                s_SimpleDatabase = null;
            }
            LogHelper.Trace(CLASS_NAME, Function_Name, "Function_Exited");
        }
Ejemplo n.º 2
0
        //static lock for instance variable todo

        public static SimpleDatabase GetInstance()
        {
            string Function_Name = "GetInstance";

            LogHelper.Trace(CLASS_NAME, Function_Name, "Function_Entered");

            if (s_SimpleDatabase == null)
            {
                s_SimpleDatabase = new SimpleDatabase();
            }
            LogHelper.Trace(CLASS_NAME, Function_Name, "Function_Exited");
            return(s_SimpleDatabase);
        }
Ejemplo n.º 3
0
        public void ThreadMemberFunction(object item)
        {
            string connectionString = (string)item;
            bool   bConnected       = false;

            while (!bConnected)
            {
                if (IsTerminated())
                {
                    break;
                }
                bConnected = SimpleDatabase.GetInstance().IsDatabaseConnectable(connectionString);
            }
            if (bConnected)
            {
                UpdateStatusHandler(connectionString, DBStatus.DB_ONLINE);
            }
        }