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.

43 lines
701 B

using HybirdFrameworkCore.Autofac.Attribute;
using HybirdFrameworkCore.AutoTask;
using Service.TBox.Server;
namespace Service.TBox.MyTask;
[Scope]
public class LockTask : ITask
{
public static readonly string TaskName = "LockTask";
private volatile bool _stop;
public string Name()
{
return TaskName;
}
public int Interval()
{
return 500;
}
public void Handle()
{
TBoxServerMgr.Server?.SessionMgr.Broadcast(TBoxServerMgr.Server?.LockMsg);
}
public bool Stoped()
{
return _stop;
}
public void Stop()
{
_stop = true;
}
public void ResetStop()
{
_stop = false;
}
}