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

Function csharp_top_level_symbols

compiler/fory_compiler/generators/csharp.py:186–211  ·  view source on GitHub ↗
(
    schema: Schema, include_services: bool = False
)

Source from the content-addressed store, hash-verified

184
185
186def csharp_top_level_symbols(
187 schema: Schema, include_services: bool = False
188) -> List[Tuple[str, str]]:
189 module_name = csharp_module_class_name(schema)
190 symbols = [
191 (
192 csharp_safe_identifier(module_name),
193 f"schema module {module_name}",
194 )
195 ]
196 for type_def in schema.enums + schema.unions + schema.messages:
197 symbols.append(
198 (
199 csharp_safe_identifier(type_def.name),
200 f"schema type {type_def.name}",
201 )
202 )
203 if include_services:
204 for service in schema.services:
205 symbols.append(
206 (
207 csharp_safe_identifier(service.name),
208 f"service {service.name}",
209 )
210 )
211 return symbols
212
213
214def validate_csharp_generation(

Callers 1

Calls 3

csharp_module_class_nameFunction · 0.85
csharp_safe_identifierFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected