Skip to content

Conversation

@Thiago-NovaesB
Copy link
Contributor

In this Pull Request, I present a proposal for refactoring the C# interface.

Positive points:

  1. Separates classes and enums into folders and files, making the code more readable and maintainable.
  2. Renames methods and properties to follow C# convention (e.g starting with uppercase letters and not abbreviating words)
  3. Annotations added to methods and properties.
  4. Use of records instead of classes when appropriate.
  5. Addition of mipcall, lpcall, and qpcall.
  6. Suppression of call (depressed).
  7. The interface is now a project, not just a file. Therefore, we can write cleaner tests.

Negative points:

  1. It is not compatible with the previous version.
  2. We need to rewrite the NuGet publication to publish the project.

If you think it's a good modification, I can help with NuGet. Or with another refactoring proposal.

Generally, if you're looking to make changes or tests to the C# interface, I'm open to helping.

@Thiago-NovaesB Thiago-NovaesB marked this pull request as draft December 26, 2025 16:27
@codecov
Copy link

codecov bot commented Dec 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.06%. Comparing base (710aaa3) to head (4902014).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2714      +/-   ##
==========================================
- Coverage   81.06%   81.06%   -0.01%     
==========================================
  Files         347      347              
  Lines       85219    85219              
==========================================
- Hits        69085    69083       -2     
- Misses      16134    16136       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jajhall jajhall changed the base branch from master to latest December 26, 2025 17:03
@jajhall
Copy link
Member

jajhall commented Dec 26, 2025

I can well believe that the C# API would benefit from refactoring, as I think it just grew from a simple proof-of-concept wrapper around the C API, and we lack the C# expertise to rework it ourselves.

However, breaking the old C# API between major versions is unwelcome, and @galabovaa will have to consider the implications for the Nuget build.

We only use master for releases, with development pushes being made to latest.

@Thiago-NovaesB
Copy link
Contributor Author

I see. If you prefer the new code organization but don't want to break compatibility, I can rename the items as they were.

@jajhall jajhall requested a review from galabovaa December 26, 2025 19:52
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.

2 participants