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

Method flush_fn_ref_candidates

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

Source from the content-addressed store, hash-verified

1448 }
1449
1450 fn flush_fn_ref_candidates(&mut self) {
1451 let cands = std::mem::take(&mut self.fn_ref_cands);
1452 if cands.is_empty() || util::is_generated_file(self.file_path) {
1453 return;
1454 }
1455 let mut seen: HashSet<(String, String)> = HashSet::new();
1456 for c in cands {
1457 // C# candidates are always bare names (its this-forms normalize to
1458 // the bare member), so the `this.`/`::` bypasses are inert — kept
1459 // for shared-shape parity. Gate: definedHere ∪ importedNames.
1460 if !c.name.starts_with("this.")
1461 && !c.name.contains("::")
1462 && !self.defined_fn_names.contains(&c.name)
1463 && !self.imported_names.contains(&c.name)
1464 {
1465 continue;
1466 }
1467 if !seen.insert((self.node_ids[c.from as usize].clone(), c.name.clone())) {
1468 continue;
1469 }
1470 let column = util::col16(self.src, &self.line_starts, c.row, c.column_byte);
1471 let name_ref = self.arena.put(&c.name);
1472 self.tables.push_ref(&RefRow {
1473 from_idx: c.from,
1474 kind: FUNCTION_REF_CODE,
1475 line: c.line,
1476 column,
1477 reference_name: name_ref,
1478 candidates: NONE_STR,
1479 from_id_str: NONE_STR,
1480 });
1481 }
1482 }
1483
1484 // --- value references --------------------------------------------------------
1485

Callers 1

extractFunction · 0.45

Calls 4

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

Tested by

no test coverage detected