Files
Jason Larabie 78c28d4936 Add C# client SDK procedures (#3666)
# Description of Changes

Closes: #3533 
Updated the C# SDK to handle procedures and procedure callbacks in a
similar fashion to the Rust client as well as added the codegen to
support it.

# API and ABI breaking changes

N/A

# Expected complexity level and risk

2 - This adds a new testing frame that should be removed once procedures
are handled with C# module bindings

# Testing

Added /sdks/csharp/examples~/regression-tests/procedure-client to match
modules/sdk-test-procedure which we can roll into the standard
regression-tests once C# supports the procedure attribute.

- [x] Add C# client test of sdk-test-procedure

---------

Signed-off-by: Jason Larabie <jason@clockworklabs.io>
2025-11-21 19:39:21 +00:00
..

Running tests

You can use dotnet test (either in this directory or in the project root directory) to run the tests.

Using a different SpacetimeDB version

To run tests using a local version of the SpacetimeDB repo, you can add a nuget.config file in the root of this repository.

The tools/write-nuget-config.sh script can generate the nuget.config. It takes one parameter: the path to the root SpacetimeDB repository (relative or absolute).

Then, you need to dotnet pack the BSATN.Runtime package in the SpacetimeDB repo.

Lastly, before running dotnet test, you should dotnet nuget locals all --clear to clear out any cached packages. This ensures you're actually testing with the new package you just built.

Example:

$ export SPACETIMEDB_REPO_PATH="../SpacetimeDB"
$ tools/write-nuget-config.sh "${SPACETIMEDB_REPO_PATH}"
$ ( cd "${SPACETIMEDB_REPO_PATH}"/crates/bindings-csharp/BSATN.Runtime && dotnet pack )
$ dotnet nuget locals all --clear
$ dotnet test