Skip to content

[UPSTREAM-2] fix(dotnet): keep a resource property apart from its class name - #63

Closed
moetemp wants to merge 2 commits into
moe/up/stream-service-samplefrom
moe/up/dotnet-resource-property-name
Closed

moetemp wants to merge 2 commits into
moe/up/stream-service-samplefrom
moe/up/dotnet-resource-property-name

Conversation

@moetemp

@moetemp moetemp commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

What changed?

This PR adds Value to a .NET resource property that has the name of its class, as StreamValue on Stream. The constructor parameter and the method requests use the same name.

Why?

C# refuses a member with the name of its class (CS0542), so a stream resource with a stream field didn't compile.

How did you test it?

The stream-service sample now generates for .NET too, and its golden shows StreamValue. A sample test round-trips a Stream through the payload converter, since System.Text.Json binds the constructor parameter by the property name.

Based on fork PR #62.

@moetemp moetemp changed the title [Upstream] fix(dotnet): keep a resource property apart from its class name [UPSTREAM-3] fix(dotnet): keep a resource property apart from its class name Oct 22, 2026
@moetemp moetemp changed the title [UPSTREAM-3] fix(dotnet): keep a resource property apart from its class name [UPSTREAM-2] fix(dotnet): keep a resource property apart from its class name Oct 23, 2026
@moetemp

moetemp commented Oct 23, 2026

Copy link
Copy Markdown
Owner Author

Replaced by #66, which is based on #61 and proves the fix on user-service.

@moetemp moetemp closed this Oct 23, 2026
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.

1 participant