Skip to content

[emitter-framework] Add ClassMethod component to csharp #7681

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: feature/ef-csharp
Choose a base branch
from

Conversation

maorleger
Copy link
Member

@maorleger maorleger commented Jun 18, 2025

This pull request introduces a new ClassMethod component to the emitter-framework package, which simplifies the generation of C# class methods from TypeSpec operations. The changes include refactoring existing code to use this new component, adding comprehensive tests, and updating exports to make the component accessible.

Refactoring and Component Addition:

  • Added the ClassMethod component (packages/emitter-framework/src/csharp/components/class-method.tsx) to encapsulate logic for generating C# class methods, including handling method names, parameters, return types, and documentation.
  • Refactored ClassMethods in class-declaration.tsx to use the new ClassMethod component, simplifying the code and improving maintainability.

@maorleger maorleger marked this pull request as ready for review June 19, 2025 18:24
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