public static BindAiRestrict Get(string BindAi) { var rec = MongoService <BindAiRestrict> .GetOnly(p => p.BindAi == BindAi); if (rec != null) { return(rec); } rec = new BindAiRestrict() { BindAi = BindAi, MaxLimit = RestrictorSvc.MaxRecentCommandCacheCount }; MongoService <BindAiRestrict> .Insert(rec); return(rec); }
public void RefreshData() { BindAiLimit = BindAiSvc.AiDic.Keys.ToDictionary(p => p, p => BindAiRestrict.Get(p).MaxLimit); }