삭제 코드 추가
This commit is contained in:
parent
890faa7b6b
commit
9c400bb0bd
|
|
@ -0,0 +1,18 @@
|
||||||
|
using Server.System;
|
||||||
|
|
||||||
|
namespace Server.Scheduler
|
||||||
|
{
|
||||||
|
public class SessionScheduler : System.Scheduler
|
||||||
|
{
|
||||||
|
System.Redis redis = new Redis();
|
||||||
|
public SessionScheduler(string cronData) : base(cronData)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Process()
|
||||||
|
{
|
||||||
|
//모든 유저해쉬를 받아오는 함수가 필요 아니 모든 접속유저를 List형태로 따로 저장해두기.
|
||||||
|
//redis.GetHash()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,10 +1,5 @@
|
||||||
using NetTopologySuite.Index.HPRtree;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json;
|
|
||||||
using Newtonsoft.Json.Linq;
|
|
||||||
using StackExchange.Redis;
|
using StackExchange.Redis;
|
||||||
using System.Collections.Generic;
|
|
||||||
using static Server.System.Redis;
|
|
||||||
using static System.Formats.Asn1.AsnWriter;
|
|
||||||
|
|
||||||
namespace Server.System
|
namespace Server.System
|
||||||
{
|
{
|
||||||
|
|
@ -36,6 +31,13 @@ namespace Server.System
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void test()
|
||||||
|
{
|
||||||
|
Console.WriteLine("--------------------");
|
||||||
|
|
||||||
|
Console.WriteLine("--------------------");
|
||||||
|
}
|
||||||
|
|
||||||
public void SetString(object value, params string[] keys)
|
public void SetString(object value, params string[] keys)
|
||||||
{
|
{
|
||||||
if (local)
|
if (local)
|
||||||
|
|
@ -70,6 +72,22 @@ namespace Server.System
|
||||||
db.ListRightPush(KeySet(keys), JsonConvert.SerializeObject(value));
|
db.ListRightPush(KeySet(keys), JsonConvert.SerializeObject(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void UpdateList<T>(int index, T value, params string[] keys)
|
||||||
|
{
|
||||||
|
if (local)
|
||||||
|
listType[KeySet(keys)][index] = JsonConvert.SerializeObject(value);
|
||||||
|
else
|
||||||
|
db.ListSetByIndex(KeySet(keys), index, JsonConvert.SerializeObject(value));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RemoveList<T>(int index, T value, params string[] keys)
|
||||||
|
{
|
||||||
|
if (local)
|
||||||
|
listType[KeySet(keys)].RemoveAt(index);
|
||||||
|
else
|
||||||
|
db.ListRemove(KeySet(keys), JsonConvert.SerializeObject(value), index);
|
||||||
|
}
|
||||||
|
|
||||||
public void SetList<T>(List<T> value, params string[] keys)
|
public void SetList<T>(List<T> value, params string[] keys)
|
||||||
{
|
{
|
||||||
foreach (var item in value)
|
foreach (var item in value)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue