Skip to content

Conversation

@tracyboehrer
Copy link
Member

@tracyboehrer tracyboehrer commented Oct 27, 2025

  • Adds ActivityType class
  • Backward compatible with existing ActivityTypes
  • Most of the changes are because the original ActivityTypes is obsoleted and required changes all over to stop using.
  • Allows for a more discoverable list:
    {BC432065-4C0A-4CA0-AFC6-20FFFF7206DB}
  • More natural comparisons: if (activity.Type == ActivityType.Message)
  • Still allows for custom Activity Types
  • Enforces casing for serialize/deserialize for consistency
  • Can be used where constants are required (Attributes, switch statements, etc...)
  • This isn't an enum, but has some of the same benefits.
  • Drawbacks
    • ActivityType.Equals does a case-insensitive compare
      • activity.Type == ActivityType.Message and activity.Type == "mEsSaGe" are both true
      • But the reverse is not true since it uses string.Equals: "mEsSaGe" == activity.Type is false.

Tracy Boehrer added 3 commits August 11, 2025 07:44
# Conflicts:
#	src/libraries/Builder/Microsoft.Agents.Builder/App/AgentApplication.cs
#	src/libraries/Builder/Microsoft.Agents.Builder/TranscriptLoggerMiddleware.cs
#	src/libraries/Extensions/Microsoft.Agents.Extensions.Teams/App/TeamsAgentExtension.cs
#	src/libraries/Storage/Microsoft.Agents.Storage.Transcript/FileTranscriptLogger.cs
#	src/tests/Microsoft.Agents.Builder.Tests/App/ApplicationRouteTests.cs
@github-actions github-actions bot added ML: Samples Tags changes to samples ML: Core Tags changes to core libraries ML: Tests Tags changes to tests labels Oct 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ML: Core Tags changes to core libraries ML: Samples Tags changes to samples ML: Tests Tags changes to tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants