MCPcopy Create free account
hub / github.com/apache/fory / csharp_schema_owner_name

Function csharp_schema_owner_name

compiler/fory_compiler/generators/csharp.py:151–157  ·  view source on GitHub ↗
(schema: Schema)

Source from the content-addressed store, hash-verified

149
150
151def csharp_schema_owner_name(schema: Schema) -> str:
152 stem = re.sub(r"[^0-9A-Za-z_]", "_", csharp_module_owner_stem(schema))
153 parts = [part for part in stem.split("_") if part]
154 owner_name = "".join(_pascal_identifier_part(part) for part in parts)
155 if not owner_name or not (owner_name[0].isalpha() or owner_name[0] == "_"):
156 owner_name = f"Schema{owner_name}"
157 return owner_name
158
159
160def _pascal_identifier_part(part: str) -> str:

Callers 2

csharp_module_file_nameFunction · 0.85
csharp_module_class_nameFunction · 0.85

Calls 3

csharp_module_owner_stemFunction · 0.85
_pascal_identifier_partFunction · 0.85
subMethod · 0.45

Tested by

no test coverage detected