Skip to content

Use PascalCase for record property names#153

Open
hadronzoo wants to merge 4 commits intoNordSecurity:mainfrom
hadronzoo:fix/issue-152-pascalcase-record-properties
Open

Use PascalCase for record property names#153
hadronzoo wants to merge 4 commits intoNordSecurity:mainfrom
hadronzoo:fix/issue-152-pascalcase-record-properties

Conversation

@hadronzoo
Copy link

Fixes #152

Record positional parameters now use PascalCase per C# naming conventions
instead of @lowerCamelCase. Keywords are prefixed with @ only when necessary.

- Add property_name filter for record/enum variant fields
- Update RecordTemplate.cs to use property_name
- Update EnumTemplate.cs to use property_name for variant fields
- Update destroy_fields macro to use property_name
- Add regression test fixture for issue-152

Signed-off-by: Joshua Griffith <Joshua.Griffith@fnf.com>
@hadronzoo hadronzoo force-pushed the fix/issue-152-pascalcase-record-properties branch from b148e1a to e4aadd4 Compare January 29, 2026 20:40
hadronzoo pushed a commit to hadronzoo/uniffi-bindgen-cs that referenced this pull request Jan 30, 2026
The PascalCase fix for record properties (PR NordSecurity#153) didn't extend to
XML doc <param name=""> attributes. This caused documentation tools
and IDEs to report "param name not found" warnings.

Apply the property_name filter to param names in RecordTemplate.cs
to match the actual PascalCase parameter names.
The PascalCase fix for record properties (PR NordSecurity#153) didn't extend to
XML doc <param name=""> attributes. This caused documentation tools
and IDEs to report "param name not found" warnings.

Apply the property_name filter to param names in RecordTemplate.cs
to match the actual PascalCase parameter names.

Signed-off-by: Josh Griffith <josh.griffith@gmail.com>
@hadronzoo hadronzoo force-pushed the fix/issue-152-pascalcase-record-properties branch from c86d956 to 2458cfb Compare January 30, 2026 02:43
C# keywords are lowercase (class, event), so PascalCase names (Class,
Event) are valid identifiers and don't need @ prefix. The is_csharp_keyword
function was checking for PascalCase strings which are never actually
keywords.

Signed-off-by: Josh Griffith <josh.griffith@gmail.com>
Signed-off-by: Josh Griffith <josh.griffith@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Record positional parameters should use PascalCase

1 participant

Comments