MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / is_csharp_constructor_node

Function is_csharp_constructor_node

graphify/extractors/csharp.py:21–33  ·  view source on GitHub ↗

A C# constructor node (instance, static or primary). A constructor carries its type's name but is reached only through `new` or a `: base(...)` / `: this(...)` initializer, never by that name, so the name-keyed call indexes leave it out.

(node: dict)

Source from the content-addressed store, hash-verified

19
20
21def is_csharp_constructor_node(node: dict) -> bool:
22 """A C# constructor node (instance, static or primary).
23
24 A constructor carries its type's name but is reached only through `new`
25 or a `: base(...)` / `: this(...)` initializer, never by that name, so the
26 name-keyed call indexes leave it out.
27 """
28 metadata = node.get("metadata") or {}
29 return (
30 isinstance(metadata, dict)
31 and metadata.get("kind") == "constructor"
32 and effective_suffix(str(node.get("source_file") or "")) == ".cs"
33 )
34
35
36def is_csharp_explicit_interface_node(node: dict) -> bool:

Callers 4

_csharp_overload_indexFunction · 0.90
extractFunction · 0.90

Calls 2

effective_suffixFunction · 0.90
getMethod · 0.45

Tested by

no test coverage detected