MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / flush_fn_ref_candidates

Method flush_fn_ref_candidates

codegraph-kernel/src/csharp.rs:1570–1602  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

1568 }
1569
1570 fn flush_fn_ref_candidates(&mut self) {
1571 let cands = std::mem::take(&mut self.fn_ref_cands);
1572 if cands.is_empty() || util::is_generated_file(self.file_path) {
1573 return;
1574 }
1575 let mut seen: HashSet<(String, String)> = HashSet::new();
1576 for c in cands {
1577 // C# candidates are always bare names (its this-forms normalize to
1578 // the bare member), so the `this.`/`::` bypasses are inert — kept
1579 // for shared-shape parity. Gate: definedHere ∪ importedNames.
1580 if !c.name.starts_with("this.")
1581 && !c.name.contains("::")
1582 && !self.defined_fn_names.contains(&c.name)
1583 && !self.imported_names.contains(&c.name)
1584 {
1585 continue;
1586 }
1587 if !seen.insert((self.node_ids[c.from as usize].clone(), c.name.clone())) {
1588 continue;
1589 }
1590 let column = util::col16(self.src, &self.line_starts, c.row, c.column_byte);
1591 let name_ref = self.arena.put(&c.name);
1592 self.tables.push_ref(&RefRow {
1593 from_idx: c.from,
1594 kind: FUNCTION_REF_CODE,
1595 line: c.line,
1596 column,
1597 reference_name: name_ref,
1598 candidates: NONE_STR,
1599 from_id_str: NONE_STR,
1600 });
1601 }
1602 }
1603
1604 // --- value references --------------------------------------------------------
1605

Callers 1

extractFunction · 0.45

Calls 5

is_generated_fileFunction · 0.85
col16Function · 0.85
putMethod · 0.65
takeFunction · 0.50
push_refMethod · 0.45

Tested by

no test coverage detected