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);
|
}
|
}
|