예제 #1
0
        public override int GetObjectIndex(object o)
        {
            bool show_full_log;

            lock (this)
                show_full_log = show_full_log_;

            var i = o as match_item;

            if (!is_filtering)
            {
                return(show_full_log ? full_log_items.index_of(i) : items_.index_of(i));
            }

            // here, it's filtered
            int line_idx = i.line_idx;

            lock (this) {
                if (sorted_line_indexes_ == null)
                {
                    return(-1);
                }

                int found = sorted_line_indexes_.BinarySearch(line_idx);
                return(found);
            }
        }