[Docs] Add cancellationToken to all C# handler examples#2735
Merged
Conversation
All C# doc examples now consistently pass cancellationToken through handler lambdas and into async SDK calls (Send, Typing, SignIn, etc.), matching the pattern established in the sending-messages docs. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
corinagum
approved these changes
Apr 3, 2026
4 tasks
corinagum
added a commit
that referenced
this pull request
May 8, 2026
Per project convention (#2735), C# handler lambdas take (context, cancellationToken) and thread the token through Send, Task.Delay, and SDK calls. The reactions guide didn't follow this. Uses named-arg form (cancellationToken: cancellationToken) for the reaction API calls because AddAsync / DeleteAsync have an optional AgenticIdentity parameter sitting between reactionType and the token. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
corinagum
added a commit
that referenced
this pull request
May 11, 2026
Per project convention (#2735), C# handler lambdas take (context, cancellationToken) and thread the token through Send, Task.Delay, and SDK calls. The reactions guide didn't follow this. Uses named-arg form (cancellationToken: cancellationToken) for the reaction API calls because AddAsync / DeleteAsync have an optional AgenticIdentity parameter sitting between reactionType and the token. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
corinagum
added a commit
that referenced
this pull request
May 13, 2026
Per project convention (#2735), C# handler lambdas take (context, cancellationToken) and thread the token through Send, Task.Delay, and SDK calls. The reactions guide didn't follow this. Uses named-arg form (cancellationToken: cancellationToken) for the reaction API calls because AddAsync / DeleteAsync have an optional AgenticIdentity parameter sitting between reactionType and the token. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
corinagum
added a commit
that referenced
this pull request
May 14, 2026
Per project convention (#2735), C# handler lambdas take (context, cancellationToken) and thread the token through Send, Task.Delay, and SDK calls. The reactions guide didn't follow this. Uses named-arg form (cancellationToken: cancellationToken) for the reaction API calls because AddAsync / DeleteAsync have an optional AgenticIdentity parameter sitting between reactionType and the token. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
corinagum
added a commit
that referenced
this pull request
May 14, 2026
## Summary Adds an in-depth guide for message reactions covering outbound add/remove and inbound `messageReaction` handling, plus links the existing "Reactions" section in the Sending Messages essentials page to the new guide. ## What's covered in the guide - Public-developer-preview banner - Adding and removing reactions (`api.reactions.add` / `api.reactions.delete` / `Reactions.AddAsync` / `Reactions.DeleteAsync`) - Receiving reactions: `messageReaction` activity handlers across all three SDKs, plus the .NET-only `OnMessageReactionAdded` / `OnMessageReactionRemoved` sub-handlers - Available reaction types — the modern set of 6 (`like`, `heart`, `1f440_eyes`, `2705_whiteheavycheckmark`, `launch`, `1f4cc_pushpin`) - Skin tone variants (`-tone1` … `-tone5`) - Rate limits (2 reactions/sec, 429 + Retry-After) - Best practices and differences from Feedback ## What's intentionally omitted - **Custom reactions section** — aligned with the Microsoft Learn agent reactions PR ([msteams-docs#13991](MicrosoftDocs/msteams-docs#13991)), which is omitting custom reaction examples due to a known client-side rendering issue. A commented-out link to the Learn reactions reference remains in the source for restoration once that PR lands. - **Advanced API client usage** — the previous draft's example referenced an `ApiClient` constructor that doesn't exist in the current SDK; removed rather than rewritten. ## Coordination - C# samples follow the project convention from #2735 (cancellationToken in handler signatures, threaded through `Send`, `Task.Delay`, and reaction API calls). - The TypeScript include uses `api.reactions.delete()` ahead of [microsoft/teams.ts#567](microsoft/teams.ts#567), which renames `remove()` → `delete()` to align with teams.py and teams.net. ## Test plan - [x] `npm start` regenerates docs cleanly with no content gaps - [x] Per-language renders (TS / Python / C#) verified in the dev server - [x] Cross-link from `essentials/sending-messages` → in-depth guide resolves correctly - [ ] Visual review on the deployed preview --------- Co-authored-by: Corina Gum <[email protected]> Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
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.
Summary
cancellationTokenparameter to all C# handler lambda signatures across 18 doc include filescancellationTokento all async SDK calls (Send,Typing,SignIn,SignOut,SendAsync)Test plan
npm run generate:docssucceeds with 0 content gapscancellationTokenin generated docs🤖 Generated with Claude Code