You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
939 B

using HybirdFrameworkCore.Autofac.Attribute;
using HybirdFrameworkCore.AutoTask;
using Service.TBox.Server;
namespace Service.TBox.MyTask;
[Scope]
public class VinTask : ITask
{
public static readonly string TaskName = "VinTask";
private volatile bool _stop = true;
public string Name()
{
return TaskName;
}
public int Interval()
{
return 100;
}
public void Handle()
{
5 months ago
if (TBoxServerMgr.Server?.SendVinMsg != null)
{
5 months ago
foreach (var vinMsg in TBoxServerMgr.Server?.SendVinMsg)
{
5 months ago
if (vinMsg != null)
{
TBoxServerMgr.Server?.SessionMgr.Broadcast(vinMsg);
}
}
}
5 months ago
}
public bool Stoped()
{
return _stop;
}
public void Stop()
{
_stop = true;
}
public void ResetStop()
{
_stop = false;
}
}