Skip to content
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

[http-client-csharp] extension method should be invoked as extension methods #5563

Open
ArcturusZhang opened this issue Jan 10, 2025 · 0 comments
Assignees
Labels
emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp

Comments

@ArcturusZhang
Copy link
Member

Here:

Return(ClientModelPlugin.Instance.TypeFactory.ClientResponseApi.ToExpression().FromResponse(client.PipelineProperty.Invoke(processMessageName, [message, requestOptionsParameter], isAsync, true))),

This ProcessMessage and ProcessMessageAsync methods are actually extension methods, but we are invoking them as if this was an instance method.
It works fine before the namespace change because our clients will always be in the same namespace as the helpers.
But after we have different namespaces, we have troubles on them.

@ArcturusZhang ArcturusZhang self-assigned this Jan 10, 2025
@ArcturusZhang ArcturusZhang added the emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp
Projects
None yet
Development

No branches or pull requests

1 participant