(int check_pos, int max_check, Func<object, bool> checker, Dictionary<object, int> reverse_map)
| 135 | } |
| 136 | |
| 137 | public int Check(int check_pos, int max_check, Func<object, bool> checker, Dictionary<object, int> reverse_map) |
| 138 | { |
| 139 | if (count == 0) |
| 140 | { |
| 141 | return 0; |
| 142 | } |
| 143 | for (int i = 0; i < Math.Min(max_check, count); ++i) |
| 144 | { |
| 145 | check_pos %= count; |
| 146 | if (list[check_pos].next == ALLOCED && !Object.ReferenceEquals(list[check_pos].obj, null)) |
| 147 | { |
| 148 | if (!checker(list[check_pos].obj)) |
| 149 | { |
| 150 | object obj = Replace(check_pos, null); |
| 151 | int obj_index; |
| 152 | if (reverse_map.TryGetValue(obj, out obj_index) && obj_index == check_pos) |
| 153 | { |
| 154 | reverse_map.Remove(obj); |
| 155 | } |
| 156 | } |
| 157 | } |
| 158 | ++check_pos; |
| 159 | } |
| 160 | |
| 161 | return check_pos %= count; |
| 162 | } |
| 163 | } |
| 164 | } |
no test coverage detected