Skip to content

Conversation

@JasonAtClockwork
Copy link
Contributor

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.

  • Add C# client test of sdk-test-procedure

@JasonAtClockwork JasonAtClockwork self-assigned this Nov 15, 2025
@JasonAtClockwork JasonAtClockwork marked this pull request as ready for review November 15, 2025 17:47
@bfops bfops added the release-any To be landed in any release window label Nov 17, 2025
Comment on lines +839 to +853
let mut func_params: String = String::new();
let mut func_args: String = String::new();

for (arg_i, (arg_name, arg_ty)) in procedure.params_for_generate.into_iter().enumerate() {
if arg_i != 0 {
func_params.push_str(", ");
func_args.push_str(", ");
}

let arg_type_str = ty_fmt_with_ns(module, arg_ty, self.namespace);
let arg_name = arg_name.deref().to_case(Case::Camel);

write!(func_params, "{arg_type_str} {arg_name}").unwrap();
write!(func_args, "{arg_name}").unwrap();
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could be deduped with reducers?

})
}

fn ty_fmt_with_ns<'a>(module: &'a ModuleDef, ty: &'a AlgebraicTypeUse, namespace: &'a str) -> impl fmt::Display + 'a {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doc comment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-any To be landed in any release window

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Procedures: C# client SDK invocation interface

4 participants