Skip to content

feat(csharp): implement get_snapshot method in C# SDK#2698

Open
atharvalade wants to merge 1 commit intoapache:masterfrom
atharvalade:feat/csharp-get-snapshot
Open

feat(csharp): implement get_snapshot method in C# SDK#2698
atharvalade wants to merge 1 commit intoapache:masterfrom
atharvalade:feat/csharp-get-snapshot

Conversation

@atharvalade
Copy link

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

@spetz
Copy link
Contributor

spetz commented Feb 7, 2026

Thank you for the contribution, I think it looks ok, but @lukaszzborek please confirm too :)

@atharvalade
Copy link
Author

The C# test failure is a transient NuGet restore issue (NU1301: 301 Moved Permanently for System.Configuration.ConfigurationManager). Not related to this PR — all C# lint, build, e2e (231 tests), BDD, and examples checks passed. Could a maintainer re-run the failed job?

@lukaszzborek
Copy link
Contributor

Yes, it's looks good. In CI was some restore problem, please rerun it

@mmodzelewski mmodzelewski changed the title feat(csharp): implement get_snapshot method in C# SDK (#2627) feat(csharp): implement get_snapshot method in C# SDK Feb 7, 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.

[csharp SDK] Implement get_snapshot method

3 participants