feat(csharp): implement get_snapshot method in C# SDK#2698
Open
atharvalade wants to merge 1 commit intoapache:masterfrom
Open
feat(csharp): implement get_snapshot method in C# SDK#2698atharvalade wants to merge 1 commit intoapache:masterfrom
atharvalade wants to merge 1 commit intoapache:masterfrom
Conversation
Contributor
|
Thank you for the contribution, I think it looks ok, but @lukaszzborek please confirm too :) |
Author
|
The C# test failure is a transient NuGet restore issue ( |
lukaszzborek
approved these changes
Feb 7, 2026
Contributor
|
Yes, it's looks good. In CI was some restore problem, please rerun it |
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.
Which issue does this PR close?
Closes #2627
Rationale
The C# SDK is missing the get_snapshot API method, which is needed for feature parity with the Rust client.
What changed?
The C# SDK had no way to capture system state snapshots. Both TCP and HTTP clients now lacked the GetSnapshotAsync method, and the SnapshotCompression/SystemSnapshotType enums used implicit 0-based values that didn't match the Rust binary wire protocol codes.
Added GetSnapshotAsync to the IIggySystem interface with TCP (binary serialization) and HTTP (JSON + binary ZIP response) implementations. Assigned explicit integer values to both enums to match Rust's as_code()/from_code() mappings. Added an integration test validating ZIP archive responses for both protocols.
Local Execution
Passed, all 55 unit tests pass, SDK and integration test projects build with 0 warnings/0 errors
Pre-commit hooks not ran, prek not installed, this is a C#-only change (no Rust modifications)
AI Usage
Claude Opus 4.6
Minimal, used for general function scaffolding and verifying binary format alignment against the Rust source
Verified by cross-referencing every enum value, byte layout, and JSON format against the Rust server source code byte-by-byte; ran full build and unit test suite locally
Yes I can explain every line