wzp
2021-07-28 864986e4cad03f6b9bba9a7e65379db496b62a6a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
namespace AsiaINFO.SMS.APPCMPP2.MyThread.DataThread
{
    using AsiaINFO.SMS.APPCMPP2.MyThread;
    using AsiaINFO.SMS.BusinessFactory;
    using AsiaINFO.SMS.CMPP2;
    using System;
    using System.Runtime.CompilerServices;
 
    public class DBTestThread : ThreadBase
    {
        public DBTestDelegate DBTestEvent;
 
        public DBTestThread(SyncEvents syncEvents) : base(syncEvents)
        {
        }
 
        private void OnDBTest(bool result)
        {
            if (this.DBTestEvent != null)
            {
                this.DBTestEvent(result);
            }
        }
 
        protected override void Run()
        {
            do
            {
                try
                {
                    lock (base._syncSuspendLogLockObject)
                    {
                        DBTestBusiness.TestDB();
                    }
                    this.OnDBTest(true);
                }
                catch (Exception)
                {
                    this.OnDBTest(false);
                }
            }
            while (!base._syncEvents.ExitThreadEvent.WaitOne(0x2710, false));
            base.Stop();
        }
 
        public delegate void DBTestDelegate(bool result);
    }
}