Skip to content

Conversation

@konard
Copy link
Member

@konard konard commented Dec 17, 2025

Summary

This PR adds full C# support to the lino-objects-codec library as requested in issue #9.

Features Implemented:

  • ObjectCodec class with Encode() and Decode() methods
  • Basic types support: null, bool, int, long, float, double, string
  • Collection support: List<object?>, Dictionary<string, object?>
  • Circular reference support with preserved object identity
  • Base64 encoding for strings (full UTF-8 support)
  • Special float values: NaN, Infinity, -Infinity
  • Thread-safe static Codec class for easy access

Project Structure:

  • csharp/src/Lino.Objects.Codec/ - Main library
  • csharp/tests/Lino.Objects.Codec.Tests/ - Unit tests (69 tests)
  • csharp/examples/ - Usage example application
  • csharp/README.md - Documentation with API reference

Changes:

  • Added full C# implementation following the same design as Python and JavaScript
  • Updated main README.md with C# examples and documentation links
  • Added CI workflow for C# builds and tests

Test plan

  • All 69 C# unit tests pass locally
  • CI workflow runs successfully for C#
  • Example application runs without errors
  • Documentation is complete and accurate

🤖 Generated with Claude Code

Fixes #9

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #9
@konard konard self-assigned this Dec 17, 2025
This commit adds full C# support to the lino-objects-codec library:

- Implement ObjectCodec class with encode/decode methods
- Support for basic types: null, bool, int, long, float, double, string
- Support for collections: List<object?>, Dictionary<string, object?>
- Full circular reference support with shared object identity preservation
- Base64 encoding for strings (UTF-8 support)
- Handle special float values: NaN, Infinity, -Infinity
- Thread-safe Codec static class
- 69 unit tests covering all functionality
- Example application demonstrating usage
- Documentation with usage examples
- CI workflow for automated testing

Resolves #9

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@konard konard changed the title [WIP] Support C# Add C# implementation Dec 17, 2025
@konard konard marked this pull request as ready for review December 17, 2025 18:16
@konard
Copy link
Member Author

konard commented Dec 17, 2025

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $11.209608 USD
  • Calculated by Anthropic: $8.084219 USD
  • Difference: $-3.125389 (-27.88%)
    📎 Log file uploaded as GitHub Gist (1151KB)
    🔗 View complete solution draft log

Now working session is ended, feel free to review and add any feedback on the solution draft.

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.

Support C#

2 participants