using System; using System.Collections.Generic; using System.Linq; // [REMOVED] Activity.Condition module no longer exists // using Activity.Condition; namespace cfg { public partial class FishingEvent { // [REMOVED] IConditionChecker type no longer exists // private List _conditionCheckers; // private Dictionary> _checkersByDataType; // /// // /// 获取所有条件检查器 // /// // public List GetConditionCheckers() // { // if (_conditionCheckers != null) return _conditionCheckers; // _conditionCheckers=new List(); // _conditionCheckers.AddRange(ConditionCheckerFactory.GetAllCommonCheckers()); // _conditionCheckers.AddRange(ConditionList.Select(condition => // ConditionCheckerFactory.CreateCheckerByConditionType(condition.Condition)) // .Where(checker => checker != null)); // _conditionCheckers.Sort((x, y)=>x.Priority.CompareTo(y.Priority)); // return _conditionCheckers; // } // /// // /// 获取关心指定数据类型的检查器(按数据类型预先索引) // /// // public List GetCheckersForDataType(Type dataType) // { // EnsureCheckersIndexed(); // return _checkersByDataType.GetValueOrDefault(dataType); // } // /// // /// 确保检查器已按数据类型索引 // /// // private void EnsureCheckersIndexed() // { // if (_checkersByDataType != null) return; // // _checkersByDataType = new Dictionary>(); // // foreach (var checker in GetConditionCheckers()) // { // // 某些检查器(如时间、ABTest)不会关心任何数据类型,CareDataChangeWithType 可能为 null // if (checker.CareDataChangeWithType == null) continue; // // foreach (var dataType in checker.CareDataChangeWithType) // { // if (!_checkersByDataType.ContainsKey(dataType)) // _checkersByDataType[dataType] = new List(); // // _checkersByDataType[dataType].Add(checker); // } // } // } } }