public void DelGroup(string user_id, string group) { try { if (!Cache.TryGetValue(user_id, out KXTUserInfoFile file)) { file = new KXTUserInfoFile ( RootPath + "\\" + user_id + ".json" ); Cache.TryAdd(user_id, file); } file.DelGroup(group); } catch { Notify(LogLevel.Warning, "用户信息数据操作异常:文件异常"); } }
public string[] ReadGroups(string user_id) { try { if (!Cache.TryGetValue(user_id, out KXTUserInfoFile file)) { file = new KXTUserInfoFile ( RootPath + "\\" + user_id + ".json" ); Cache.TryAdd(user_id, file); } file.ReadGroups(out string[] friends); return(friends); } catch { Notify(LogLevel.Warning, "用户信息数据操作异常:文件异常"); return(new string[0]); } }