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

Method flush_fn_ref_candidates

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

Source from the content-addressed store, hash-verified

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

Callers 1

extractFunction · 0.45

Calls 4

is_generated_fileFunction · 0.85
col16Function · 0.85
putMethod · 0.80
push_refMethod · 0.45

Tested by

no test coverage detected