Add JsonRpc.DisplayName property#1395
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a new DisplayName property to the JsonRpc class for improved debugging and diagnostics, allowing developers to assign human-readable names to JsonRpc instances to help trace them back to their creators. The property is purely for diagnostic purposes and doesn't affect RPC functionality.
Changes:
- Adds a new public
DisplayNameproperty toJsonRpcclass withinitaccessor for immutable configuration - Implements
DebuggerDisplayattribute to show the display name in debugger views - Increments version from 2.24 to 2.25 to reflect the new API addition
- Includes a style fix in
NerdbankMessagePackFormatter.cs(removes unnecessarythis.prefix innameof)
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| version.json | Version bump from 2.24 to 2.25 for new API member |
| test/StreamJsonRpc.Tests/JsonRpcSimpleTests.cs | New test file with tests for DisplayName property default and settable behaviors |
| src/StreamJsonRpc/JsonRpc.cs | Adds DisplayName property, DebuggerDisplay attribute, and private DebuggerDisplay property |
| src/StreamJsonRpc/NerdbankMessagePackFormatter.cs | Style fix: removes unnecessary this. prefix from MemberNotNull attribute |
RyanToth3
approved these changes
Feb 17, 2026
AArnott
enabled auto-merge
February 17, 2026 16:48
Member
|
Just what I needed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This has no functional value at runtime at all. But it will allow the brokered service library to 'name' each JsonRpc object it creates after the concrete type of the descriptor so that when serialization failures occur, it's much easier to backtrace the JsonRpc object to its owning descriptor so we know where to apply the fix.